原来的表结构是这样:
studentId studentName
2232 张三
2233 李四
我用这样的方法插入:
insert into table_student(studentId,studentName)
select '2234','aaa'from dual
union
select '2235','bbb' from dual
这样是可以插入的
但是我建表的时候忘了加主键,现在加入后
表结构变成:
id studentId studentName
1 2232 张三
2 2233 李四
我再用上面的方法插入:
insert into table_student(studentId,studentName)
select SEQ_SEQUENCE.nextval, '2234','aaa'from dual
union
select SEQ_SEQUENCE.nextval,'2235','bbb' from dual
就会报错:ORA-02287:sequence number not allowed here
请问该在这种情况下该如何实现一次插入多条数据?