How to view the table structure in DB2 database
How to view the table structure in db2 database
Open db2
command window, connect to db2 with following command.
> db2 connect to DATABASE_NAME USER USERNAME USING PASSWORD
Once you connected successfully, issue the following command to view the table structure.
> db2 "describe select * from SCHEMA_NAME.TABLE_NAME"
The above command will display db2 table structure in tabular format.
Note: Tested on DB2 Client 9.7.11