我使用序列出现错误,请问有什么办法能使用序列吗?SQL> create table person2
2 (
3 id number primary key,
4 name varchar2(20),
5 birth date
6 )
7 partition by range (id)
8 (
9 partition part_01 values less than(333) tablespace person2_space01,
10 partition part_02 values less than(666) tablespace person2_space02,
11 partition part_03 values less than(999) tablespace person2_space03
12 );Table createdSQL> insert into person2 values(seq_person2.nextval,'rubik',sysdate);insert into person2 values(seq_person2.nextval,'rubik',sysdate)ORA-14400: 插入的分区关键字未映射到任何分区
2 (
3 id number primary key,
4 name varchar2(20),
5 birth date
6 )
7 partition by range (id)
8 (
9 partition part_01 values less than(333) tablespace person2_space01,
10 partition part_02 values less than(666) tablespace person2_space02,
11 partition part_03 values less than(999) tablespace person2_space03
12 );Table createdSQL> insert into person2 values(seq_person2.nextval,'rubik',sysdate);insert into person2 values(seq_person2.nextval,'rubik',sysdate)ORA-14400: 插入的分区关键字未映射到任何分区
里面吧?就是说分区表不能用序列了?
(
id integer,
name varchar2(20),
birth date
)
partition by range (id)
(
partition part_01 values less than(333) tablespace person2_space01,
partition part_02 values less than(888) tablespace person2_space02,
partition part_03 values less than(maxvalue) tablespace person2_space03
); create index idx_person2 on person2(id)local
(
partition part_01 tablespace person2_space01,
partition part_02 tablespace person2_space02,
partition part_03 tablespace person2_space03
);这样就行了