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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -