之前版本的oracle中,创建分区表都会有个maxvalue放超过指定范围的数据
CREATE TABLE "SCOTT"."PARTITION_HB"
( "PID" NUMBER NOT NULL ENABLE,
"PITEM" VARCHAR2(200),
"PDATA" DATE NOT NULL ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BAIXYU"
PARTITION BY RANGE ("PID")
(PARTITION "PART_01" VALUES LESS THAN (5)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BAIXYU1" NOCOMPRESS ,
PARTITION "PART_02" VALUES LESS THAN (10)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BAIXYU2" NOCOMPRESS ,
PARTITION "PART_03" VALUES LESS THAN (20)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BAIXYU3" NOCOMPRESS ,
PARTITION "PART_04" VALUES LESS THAN (MAXVALUE)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "BAIXYU4" NOCOMPRESS ) ;
alter table PARTITION_HB split Partition ptMAX at (50) into (Partition p05 tablespace baixyu1, Partition ptMAX tablespace baixyu4);
select partition_name,high_value,partition_position,tablespace_name from user_tab_partitions where table_name='PARTITION_HB';
1 PART_01 <Long> 1 BAIXYU1
2 PART_02 <Long> 2 BAIXYU2
3 PART_03 <Long> 3 BAIXYU3
5 P05 <Long> 5 BAIXYU1
6 PTMAX <Long> 6 BAIXYU4
insert into PARTITION_HB(pid,pdata)values(50,sysdate);
50这个临界值是放到了ptmax这个分区里面了,就是小于这个值的放前面的分区,大于等于这个值的数据放后面的分区里。
select * from PARTITION_HB partition (ptMAX);
1 50 2017/5/26 18:10:38
在第五个分区有数据47,我们split47会报错
select * from PARTITION_HB partition (p05);
1 47 2017/5/26 18:03:01
alter table PARTITION_HB split Partition ptMAX at (47) into (Partition p06 tablespace baixyu1, Partition ptMAX tablespace baixyu4);
ora-14080
或者在max分区中有数据,你split的值比存在的数据小,那么也会报上面的错误