Column names are pulled in random order; how to pull with DB order preserved?

General
New Member

Column names are pulled in random order; how to pull with DB order preserved?

How can I pull the column names with order preserved?

 

Column names are pulled in random order instead of the order they appear with 

 

select ColumnName from dbc.columns where DatabaseName = 'DB_Name' 
and TableName = 'Table_Name';

image.png

 

However the database order is:

 

image.png


Accepted Solutions
Teradata Employee

Re: Column names are pulled in random order; how to pull with DB order preserved?

Order by columnid

1 ACCEPTED SOLUTION
1 REPLY
Teradata Employee

Re: Column names are pulled in random order; how to pull with DB order preserved?

Order by columnid