2012-09-13 56 views

回答

2

看一看在SYSCAT.TABLES目錄視圖:

select remarks from syscat.tables where tabname = 'xyz' 
+0

這正是我正在尋找。謝謝。 –

-2

選擇colname的,從SYSCAT.COLUMNS言論其中tabname = 'T1'

這將是對你有用。

+1

問題是關於表的問題,答案已經提供,你的是列的變體。 – Zielu

0

要檢索DB2中對象的註釋(或「註釋」),請查看目錄表。 The SYSCAT catalog tables for DB2 LUWSYSIBM catalog tables in DB2 z/OS不同。

對於LUW,以下命令將獲得表級的意見和列級註釋:

select tabname, tabschema, remarks from syscat.tables where tabname='TABLENAME' 
select tabname, tabschema, colname, remarks from syscat.columns where tabname='TABLENAME' 

對於z/OS,應使用下列查詢來代替:

select name, creator, dbname, remarks from sysibm.systables where name='TABLENAME' 
select name, tbcreator, tbname, remarks from sysibm.syscolumns where tbname='TABLENAME'