Cloud Computing

Q 31) How to generate a list of tables which are of type ” SET ” in Teradata ?

Answer >

SEL DATABASENAME,TABLENAME, ‘SET’ AS STATUS FROM DBC.TABLES WHERE TABLEKIND=’T’ AND CHECKOPT=’N’
AND (DATABASENAME,TABLENAME) NOT IN (SELECT DATABASENAME,TABLENAME FROM DBC.INDICES WHERE INDEXTYPE=’P’ AND UNIQUEFLAG=’Y’ GROUP BY 1,2)
AND DATABASENAME LIKE <***** List the databasename for which you want to find SET Tables ****>

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *