oracle分区表分区自动插入空值问题
oracle11g新功能自动分区,如果插入的数据在分区列上找不到对应的分区,那么就会根据分区列的值自动创建分区,但是如果在分区列上传人空值,就会出现ORA-14300报错:
创建测试分区表
create table t_range2 (id number not null PRIMARY KEY, test_date date)
partition by range (test_date) interval (numtoyMinterval (1,MONTH))
(
partition p_2017_01_01 values less than (to_date(2017-01-01, yyyy-mm-dd))
);
插入数据:
SQL> insert into t_range2 values(10,sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> insert into t_range2 values(10,null);
insert into t_range2 values(10,null)
*
ERROR at line 1:
ORA-14300: partitioning key maps to a partition outside maximum permitted
number of partitions
SQL> insert into t_range2 values(10,);
insert into t_range2 values(10,)
*
ERROR at line 1:
ORA-14300: partitioning key maps to a partition outside maximum permitted
number of partitions
oracle11g新功能自动分区,如果插入的数据在分区列上找不到对应的分区,那么就会根据分区列的值自动创建分区,但是如果在分区列上传人空值,就会出现ORA-14300报错: 创建测试分区表 create table t_range2 (id number not null PRIMARY KEY, test_date date) partition by range (test_date) interval (numtoyMinterval (1,MONTH)) ( partition p_2017_01_01 values less than (to_date(2017-01-01, yyyy-mm-dd)) ); 插入数据: SQL> insert into t_range2 values(10,sysdate); 1 row created. SQL> commit; Commit complete. SQL> insert into t_range2 values(10,null); insert into t_range2 values(10,null) * ERROR at line 1: ORA-14300: partitioning key maps to a partition outside maximum permitted number of partitions SQL> insert into t_range2 values(10,); insert into t_range2 values(10,) * ERROR at line 1: ORA-14300: partitioning key maps to a partition outside maximum permitted number of partitions
创建测试分区表
create table t_range2 (id number not null PRIMARY KEY, test_date date)
partition by range (test_date) interval (numtoyMinterval (1,MONTH))
(
partition p_2017_01_01 values less than (to_date(2017-01-01, yyyy-mm-dd))
);
插入数据:
SQL> insert into t_range2 values(10,sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> insert into t_range2 values(10,null);
insert into t_range2 values(10,null)
*
ERROR at line 1:
ORA-14300: partitioning key maps to a partition outside maximum permitted
number of partitions
SQL> insert into t_range2 values(10,);
insert into t_range2 values(10,)
*
ERROR at line 1:
ORA-14300: partitioning key maps to a partition outside maximum permitted
number of partitions
oracle11g新功能自动分区,如果插入的数据在分区列上找不到对应的分区,那么就会根据分区列的值自动创建分区,但是如果在分区列上传人空值,就会出现ORA-14300报错: 创建测试分区表 create table t_range2 (id number not null PRIMARY KEY, test_date date) partition by range (test_date) interval (numtoyMinterval (1,MONTH)) ( partition p_2017_01_01 values less than (to_date(2017-01-01, yyyy-mm-dd)) ); 插入数据: SQL> insert into t_range2 values(10,sysdate); 1 row created. SQL> commit; Commit complete. SQL> insert into t_range2 values(10,null); insert into t_range2 values(10,null) * ERROR at line 1: ORA-14300: partitioning key maps to a partition outside maximum permitted number of partitions SQL> insert into t_range2 values(10,); insert into t_range2 values(10,) * ERROR at line 1: ORA-14300: partitioning key maps to a partition outside maximum permitted number of partitions
下一篇:
MySql使用MyCat分库分表(一)