Find databases containing a particular table on Teradata server

The query below finds all databases in Teradata instance containing a particular table.

Query

SELECT  DatabaseName
FROM    DBC.TablesV
WHERE   TableName = 'table_name' -- provide table name here
AND     TableKind = 'T'
ORDER BY    DatabaseName;

Columns

  • DatabaseName - name of the database

Rows

  • One row: represents one database
  • Scope of rows: all databases containing the provided table name
  • Ordered by: database name

Sample results

The screen below shows all databases that contain the employees table.

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