db2命令收集 創建帶分區的表: create table table_name( )in table_space index in index_space partition by range(col_name) (STARTING MINVALUE, STARTING '1/1/1999' EN ...
db2命令收集
創建帶分區的表:
create table table_name(
)in table_space index in index_space
partition by range(col_name)
(STARTING MINVALUE,
STARTING '1/1/1999' ENDING '12/31/2020' EVERY 1 YEAR ,
ENDING MAXVALUE)
-- 該方法創建出來的表無法添加多餘分區,分區已分配滿
查看表分區:db2 describe data partitions for table xxx;
添加表分區:db2 "alter table TABLENAME add partition starting '1/1/1991' ending '12/31/1991'"