sql - Description of Tables in DB2 based on dataype -
how can see details of columns based on data type table in db2 . suppose have table 100 columns want see columns of data type timestamp only. how can achieve ?
if you're on linux/unix/windows db2, can use syscat.columns catalog view:
select * syscat.columns tabschema= 'your_schema' , tabname = 'your_table' , typename = 'timestamp' replacing your_schema , your_table, obviously. if you're on mainframe db2, use similar sysibm.syscolumns catalog view:
select * sysibm.syscolumns tbcreator='your_schema' , tbname ='your_table' , coltype ='timestmp'
Comments
Post a Comment