ORA-02287: sequence number not allowed here解决

来源:互联网 发布:java 弱引用 使用场景 编辑:程序博客网 时间:2024/06/06 17:14

脚本中插入数据:
ORA-02287: sequence number not allowed here问题的解决
思路:通过临时表“转移”数据。
解决方法:
1、新建临时表,将数据插入临时表中
create table table1_tmp();
insert into table1_tmp select * from *;
2、新建序列,将临时表数据插入正式表中
--drop sequence seq1;
create sequence seq1
start with 1
increment by 1
nomaxvalue
cache 20;
insert into table1 select seq1.nextval, tmp.* from table1_tmp tmp;
3、drop临时表
drop table  table1_tmp;


0 0