软件测试开发语言oracle 创建分区表,增(追)加分区 数据库开发
CREATE TABLE T_BI_CurrentAccountDetailed
(
OrderDate DATE,
BranchFlag varchar2(3),
SortId varchar2(11),
OrderNo varchar2(15),
CustomerId varchar2(11),
AmtOfDebitSide NUMBER(14,2) DEFAULT 0,
AmtOfCreditSide NUMBER(14,2) DEFAULT 0,
Balance NUMBER(14,2) DEFAULT 0,
GrossProfit NUMBER(14,2) DEFAULT 0,
RepayWay varchar2(20),
Remarks varchar2(100),
PRIMARY KEY(OrderDate,BranchFlag,SortId,OrderNo)
)PARTITION BY RANGE(OrderDate)
(PARTITION CAD2008_01 VALUES LESS THAN (TO_DATE('2008-01-01','YYYY-MM-DD')) ,
PARTITION CAD2008_02 VALUES LESS THAN (TO_DATE('2008-02-01','YYYY-MM-DD')) ,
PARTITION CAD2008_03 VALUES LESS THAN (TO_DATE('2008-03-01','YYYY-MM-DD')) ,
PARTITION CAD2008_04 VALUES LESS THAN (TO_DATE('2008-04-01','YYYY-MM-DD')) ,
PARTITION CAD2008_05 VALUES LESS THAN (TO_DATE('2008-05-01','YYYY-MM-DD')) ,
PARTITION CAD2008_06 VALUES LESS THAN (TO_DATE('2008-06-01','YYYY-MM-DD')) ,
PARTITION CAD2008_07 VALUES LESS THAN (TO_DATE('2008-07-01','YYYY-MM-DD')) ,
PARTITION CAD2008_08 VALUES LESS THAN (TO_DATE('2008-08-01','YYYY-MM-DD')) ,
PARTITION CAD2008_09 VALUES LESS THAN (TO_DATE('2008-09-01','YYYY-MM-DD')) ,
PARTITION CAD2008_10 VALUES LESS THAN (TO_DATE('2008-10-01','YYYY-MM-DD')) ,
PARTITION CAD2008_11 VALUES LESS THAN (TO_DATE('2008-11-01','YYYY-MM-DD')) ,
PARTITION CAD2008_12 VALUES LESS THAN (TO_DATE('2008-12-01','YYYY-MM-DD')) ,
文章来源于领测软件测试网 https://www.ltesting.net/