DESCRIBE {[OUTPUT] {select-statement | call-statement |
XQUERY XQuery-statement} |
{TABLE | {INDEXES | DATA PARTITIONS} FOR TABLE} table-name [SHOW DETAIL]}
例如:
db2 => describe table   SYSCAT.TABLESPACES


Column                         Type      Type
name                           schema    name               Length   Scale Nulls
------------------------------ --------- ------------------ -------- ----- ------
TBSPACE                        SYSIBM    VARCHAR                 128     0 No   
DEFINER                        SYSIBM    VARCHAR                 128     0 No   
CREATE_TIME                    SYSIBM    TIMESTAMP                10     0 No   
TBSPACEID                      SYSIBM    INTEGER                   4     0 No   
TBSPACETYPE                    SYSIBM    CHARACTER                 1     0 No   
DATATYPE                       SYSIBM    CHARACTER                 1     0 No   
EXTENTSIZE                     SYSIBM    INTEGER                   4     0 No   
PREFETCHSIZE                   SYSIBM    INTEGER                   4     0 No   
OVERHEAD                       SYSIBM    DOUBLE                    8     0 No   
TRANSFERRATE                   SYSIBM    DOUBLE                    8     0 No   
PAGESIZE                       SYSIBM    INTEGER                   4     0 No   
DBPGNAME                       SYSIBM    VARCHAR                 128     0 No   
BUFFERPOOLID                   SYSIBM    INTEGER                   4     0 No   
DROP_RECOVERY                  SYSIBM    CHARACTER                 1     0 No   
REMARKS                        SYSIBM    VARCHAR                 254     0 Yes  
NGNAME                         SYSIBM    VARCHAR                 128     0 No   

  16 record(s) selected.


db2 =>describe  select TBSPACETYPE   from SYSCAT.TABLESPACES


SQLDA Information

 sqldaid : SQLDA     sqldabc: 1136  sqln: 20  sqld: 1

 Column Information

 sqltype               sqllen  sqlname.data                    sqlname.length
 --------------------  ------  ------------------------------  --------------
 452   CHARACTER            1  TBSPACETYPE                                 11