List of all dbc tables in Teradata

The below query list all the dbc tables in Teradata.

Query to list all the dbc tables in Teradata

SELECT  DatabaseName,
        TableName,
        CreateTimeStamp,
        LastAlterTimeStamp
FROM    DBC.TablesV
WHERE   TableKind = 'T'
and     DatabaseName = 'DBC'
ORDER BY    TableName;

Here,

  • DatabaseName – Name of the database where the tables belong. In this case, DBC is the database name.
  • TableName – The name of the DBC tables.
  • CreateTimeStamp – Date and Time of when the table was created.
  • LastAlterTimeStamp – Date and Time when the table was altered using Teradata ALTER statement.

Sample Result

When you execute the above query, it returns the list of dbc tables. Here is the sample.

List of all dbc tables in Teradata

Leave a Comment