Archives of the TeradataForum
Message Posted: Wed, 26 Aug 2009 @ 21:36:49 GMT
<-- Anonymously Posted: Wednesday, August 26, 2009 16:46 -->
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
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|