文章詳情頁
DB2獲取當(dāng)前用戶表、字段、索引等詳細(xì)信息
瀏覽:256日期:2023-03-24 09:22:30
獲取所有表、字段、索引等詳細(xì)信息
SELECT d.name tbName, COALESCE(d.remarks, "") tbDesc, a.name columnName, a.coltype columnType , decode(a.nulls,"Y","1","0") notNull, decode(a.identity,"Y","1","0") auto, a.longlength width, a.scale precision, COALESCE(a.remarks, "") comment, decode(n.unique_colcount,"1","1","0") unique, decode(n.uniquerule,"P","1","0") masterKey, COALESCE(n.name, "") indexName FROM sysibm.syscolumns a INNER JOIN sysibm.systables d on a.tbname=d.name LEFT JOIN sysibm.sysindexes n on n.tbname=d.name and SUBSTR(colnames,2)=a.name where d.type="T"and d.tbspace="USERSPACE1"
標(biāo)簽:
DB2
上一條:DB2 數(shù)據(jù)庫創(chuàng)建、表的ixf文件導(dǎo)出導(dǎo)入示例下一條:DB2新手使用的一些小筆記:新建實例、數(shù)據(jù)庫路徑不存在、客戶端連接 .
相關(guān)文章:
1. 淺談SELECT?*會導(dǎo)致查詢效率低的原因2. ACCESS轉(zhuǎn)SQL數(shù)據(jù)庫相關(guān)的幾個技能3. mysql啟動時報錯 ERROR! Manager of pid-file quit without4. mysql8.0.20數(shù)據(jù)目錄遷移的方法5. 訪問Oracle數(shù)據(jù)庫時如何限制繞過漏洞6. MySQL/MariaDB 如何實現(xiàn)數(shù)據(jù)透視表的示例代碼7. DB2的高可用性和災(zāi)難恢復(fù)概述8. 如何在SQL Server 2005中為安裝程序增加計數(shù)器注冊表項值9. Mybatis自關(guān)聯(lián)查詢一對多查詢的實現(xiàn)示例10. sql server 災(zāi)難恢復(fù)
排行榜
