teradatasql

List all the tables and row counts in Teradata SQL?


I would like to translate the following Oracle SQL query into Teradata SQL:

SELECT table_name, num_rows FROM ALL_TABLES

This query retrieves all the tables along with the number of rows. What is the Teradata SQL equivalent?


Solution

  • Try this and play :)

    SELECT DatabaseName, TableName, CreateTimeStamp, LastAlterTimeStamp FROM DBC.TablesV