List all columns in specific table in Teradata database

Query below returns a list of all columns in a 'Product' table of 'Sales' database.

Query

SELECT  ColumnName
FROM    DBC.ColumnsV
WHERE   DatabaseName = 'Sales'
AND     TableName = 'Product'
ORDER BY    ColumnID;

Columns

  • ColumnName - name of a column in a table

Rows

  • One row represents a single column
  • Scope of rows: represent all columns in a named table
  • Ordered by column position in table

Sample results

You could also get this

Get this interactive HTML data dictionary in minutes with Dataedo.

See live HTML data dictionary sample

Try for free

0
There are no comments. Click here to write the first comment.