文章詳情頁(yè)
DB2獲取當(dāng)前用戶表、字段、索引等詳細(xì)信息
瀏覽:334日期: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ù)庫(kù)創(chuàng)建、表的ixf文件導(dǎo)出導(dǎo)入示例下一條:DB2新手使用的一些小筆記:新建實(shí)例、數(shù)據(jù)庫(kù)路徑不存在、客戶端連接 .
相關(guān)文章:
1. Sql Server 壓縮數(shù)據(jù)庫(kù)日志文件的方法2. MariaDB中1045權(quán)限錯(cuò)誤導(dǎo)致拒絕用戶訪問(wèn)的錯(cuò)誤解決方法3. Microsoft Office Access凍結(jié)字段的方法4. 實(shí)例講解MySQL 慢查詢5. MySQL 常用函數(shù)總結(jié)6. 簡(jiǎn)單聊一聊SQL中的union和union all7. DB2數(shù)據(jù)庫(kù)控制中心亂碼問(wèn)題解決方法集合8. 詳解MySQL 慢查詢9. 淺談一下MyISAM和InnoDB存儲(chǔ)引擎的區(qū)別10. SQL Server主鍵約束(PRIMARY KEY)
排行榜

網(wǎng)公網(wǎng)安備