How to list the columns of a table in Teradata SQL
14,368
different possibillities
Help table <TableName> -- All columns of a table
Help columns <ViewName>.* -- All columns of a View
Show table <TableName> -- DDL of table
Show view <ViewName> -- DDL of View
show select * from <ViewName>-- DDL of base table in a view
or select from system table.
SELECT ColumnName
FROM dbc.columnsV
WHERE DatabaseName = 'DB_NAME' and
TableName = 'table_name';
Searching for teradata column name list
gives some more answers.
Related videos on Youtube
Author by
timbram
Updated on June 04, 2022Comments
-
timbram almost 2 years
I have been googling and searching this site but cant find an answer to this simple question.
How can I list or select all the columns of a table in Teradata?
-
prashanth over 3 years
select ColumnName from dbc.columns where DatabaseName = <'DB_NAME'> and TableName = <'table_name'>;
-