db2切換schema命令 db2如何查看某個(gè)庫中的所有表?
db2如何查看某個(gè)庫中的所有表?從中選擇名稱sysibm.systables系統(tǒng)其中type=“t”和creator=“db2admin”type:數(shù)據(jù)庫表由t表示;數(shù)據(jù)庫視圖由V表示。creator
db2如何查看某個(gè)庫中的所有表?
從中選擇名稱sysibm.systables系統(tǒng)其中type=“t”和creator=“db2admin”type:數(shù)據(jù)庫表由t表示;數(shù)據(jù)庫視圖由V表示。creator:數(shù)據(jù)庫對象的創(chuàng)建者從中選擇tabnamesyscat.tables表其中tabschema=current schema//Get all user tables in current mode 從sysibm.systablesWhere type=“T”andcreator=“db2admin”type:數(shù)據(jù)庫表用T表示;數(shù)據(jù)庫視圖用V表示;Creator:數(shù)據(jù)庫對象的創(chuàng)建者,選擇ecttabnamefromsyscat.tablewheretabschema=currentschema//獲取當(dāng)前模式下的所有用戶表
創(chuàng)建分區(qū):alter table tablename ADD partition statis月開始“201301”
包含結(jié)束“20090102”包含。
查詢分區(qū)選擇*從syscat.datapartitions文件T其中tabschema=模式名稱和tabname=表名