美文网首页
DB2 LUW常用SQL

DB2 LUW常用SQL

作者: CodingCode | 来源:发表于2022-10-09 01:51 被阅读0次
  1. 查找所有的表
$ db2 "select name from sysibm.systables where creator = 'DB2INST1' and type = 'T'"
or
$ db2 "select tabname from syscat.tables where tabschema = 'DB2INST1' and type = 't'"
or
$ db2 list tables
  1. 查看表定义
$ db2 describe table <tablename>

For example:
$ db2 describe table SYSCAT.TABLES

相关文章

网友评论

      本文标题:DB2 LUW常用SQL

      本文链接:https://www.haomeiwen.com/subject/joqgartx.html