In DB2 Display a table's definition

后端 未结 11 1059
长情又很酷
长情又很酷 2021-02-04 03:35

Hello everybody I am learning DB2 and would like to know how to see a table\'s characteristics after I create one.

Similar to the EXPLAIN TABLE command in MySQL.

<
11条回答
  •  执笔经年
    2021-02-04 03:51

    I know this is an old question, but this will do the job.

    SELECT colname, typename, length, scale, default, nulls
      FROM syscat.columns
     WHERE tabname = ''
       AND tabschema = ''
     ORDER BY colno
    
        

    提交回复
    热议问题