31 Jul 18 · npack ·       Add to Favorites   Report

How to find out the tables with specific column names in them in Teradata?

Scenario: We have column names that we want to look up in the entire DB and list out all tables which have those columns.

Solution:

You are looking for this:

SELECT tablename,columnname
FROM dbc.columnsV
WHERE ColumnName in ('col1', 'col2');

npack

posted on 31 Jul 18

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied