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,
DBCis the database name. - TableName – The name of the
DBCtables. - 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.
