文章详情页
DB2获取当前用户表、字段、索引等详细信息
浏览:387日期:2023-03-24 09:22:30
获取所有表、字段、索引等详细信息
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"
标签:
DB2
相关文章:
1. Mysql使用concat函数实现关键字模糊查询功能(列表数据过滤含前后端代码)2. VS连接SQL server数据库及实现基本CRUD操作3. SQL Server2022安装提示"安装程序在运行作业UpdateResult时失败"解决方法4. sqlserver给表添加新字段、给表和字段添加备注、更新备注及查询备注(sql语句)5. 关于SQL表中drop table和delete table的区别6. MySQL中创建表的三种方法汇总7. sql语句查询重复的数据(最新推荐)8. Oracle中dbms_output.put_line的用法实例9. MySQL中索引的优化的示例详解10. DBeaver连接mysql数据库图文教程(超详细)
排行榜

网公网安备