![](//teradataforum.com/imgs/ptdfw1.gif) |
![](//teradataforum.com/imgs/ptdfw2.gif) |
Archives of the TeradataForum
Message Posted: Wed, 26 Aug 2009 @ 21:36:49 GMT
Subj: | | Compare structure of table in different database |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Wednesday, August 26, 2009 16:46 -->
HI,
I want to compare the structure of the table in different database and take the table which of same structure on one database. I was trying to
compare the columns count from the dbc.columns and doing it But could not able to write a query to do this. Could you please suggest me some query
to do this.
SEL DATABASENAME,TABLENAME,COUNT(COLUMNNAME) AS CNT FROM DBC.COLUMNS WHERE
TABLENAME='Some_table'
GROUP BY 1,2
Thanks & Regards
| |