获取所有表、字段、索引等详细信息
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, '') indexNameFROMsysibm.syscolumns aINNER JOIN sysibm.systables d on a.tbname=d.nameLEFT JOIN sysibm.sysindexes n on n.tbname=d.name and SUBSTR(colnames,2)=a.namewhere d.type='T'and d.tbspace='USERSPACE1'
新闻热点
疑难解答
图片精选