As in subject... is there a way of looking at an empty table schema without inserting any rows and issuing a SELECT?
+2
A:
Are you looking for DESCRIBE?
db2 describe table user1.department
Table: USER1.DEPARTMENT
Column Type Type
name schema name Length Scale Nulls
------------------ ----------- ------------------ -------- -------- --------
AREA SYSIBM SMALLINT 2 0 No
DEPT SYSIBM CHARACTER 3 0 No
DEPTNAME SYSIBM CHARACTER 20 0 Yes
Plasmer
2008-09-30 16:12:23
A:
Looking at your other question, DESCRIBE may not work. I believe there is a system table that stores all of the field information.
Perhaps this will help you out. A bit more coding but far more accurate.
Mike Wills
2008-09-30 17:59:54