|
|
Archives of the TeradataForum
Message Posted: Wed, 28 Feb 2007 @ 20:36:42 GMT
Subj: | | Re: Is there any way to find all tables which have two particular column in a database |
|
From: | | Donna Poston |
Murugesan, you can use a derived table to find all the tables/views having a columnname client_id and join to the derive table.
Example
select * from dbc.columns a
, (select databasename, tablename
from dbc.columns where columnname =
'client_id')
t1
where a.databasename = t1.databasename
and a.tablename = t1.tablename
and a.columnname = 'art_no'
| |