Find databases containing a particular table on Teradata server

Bart Gawrych - Dataedo Team Bart Gawrych 2019-01-15

Table of Contents:

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


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


    • DatabaseName - name of the database


    • 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.

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

    By continuing to use our website, you consent to the use of cookies in accordance with our Privacy Policy (updated 28-04-2020).