Description of a DB2 Table

Description of a DB2 Table The describe command does not work on mainframe DB2. Generally we use the following command on UDB database or database on oracle But this does not work with mainframe DB2. You can use the following command to get the description of columns in a table. The following query will list the description of  table tablename whose creator is nameofcreator

SELECT * FROM SYSIBM.SYSCOLUMNS AND TBCREATOR=’nameofcreator’                            

If you wish to fetch only the column names in a table then you can use the following query

SELECT * FROM tablename WHERE 1=2