怎么查询表所在的表空间?在DB2中?
谢谢!
------解决方案--------------------------------------------------------
在系统表里有 syscat.tables
------解决方案--------------------------------------------------------
有系统目录视图syscat.tablespaces,syscat.tables
------解决方案--------------------------------------------------------
- SQL code
select tabschema,tabname,tbspace from syscat.tables;
------解决方案--------------------------------------------------------
select tbspace from syscat.tables where tabschema='xxxx' and tabname='tbl1';
------解决方案--------------------------------------------------------
控制中心里面能够查呀~~
------解决方案--------------------------------------------------------
select tbspace from syscat.tables where tabschema='要查询的表创建用户' and tabname='要查询的表名'
------解决方案--------------------------------------------------------
运行:db2cmd
db2 connect to dbname
db2 list tablespaces
------解决方案--------------------------------------------------------
db2look -d dbname -e -a -t 表名