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.

    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.

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