Monday, 17 October 2016

How to find table wise list of column in Teradata

There may be requirement that you need to find list of the columns of a table or tables. To find this you need to query DBC.COLUMNS data dictionary view.

Example:-

SELECT  * FROM DBC.COLUMNS;

Above query will show all the tables and their columns.

If you know the table or view name then you can specify that in the where condition.

Example:-

SEKECT  * FROM SBC.COLUMNS
WHERE TABLENAME = 'TABLE_NAME';

No comments:

Post a Comment