DB2 LUW常用SQL

2022-10-09  本文已影响0人  CodingCode
  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
上一篇 下一篇

猜你喜欢

热点阅读