table1有2个字段:userName varchar2(50),ID int.
说明:ID是自增列(seq_a.nextval)table2 有1个字段,userName现在我想:
insert into table1
select userName,seq_a.nextval
from table2出错,问题:select后不能跟序号seq_a.nextval
怎么解决
说明:ID是自增列(seq_a.nextval)table2 有1个字段,userName现在我想:
insert into table1
select userName,seq_a.nextval
from table2出错,问题:select后不能跟序号seq_a.nextval
怎么解决
create sequence tb1_seq start with 1 increment by 1 nomaxvalue nocycle;insert into tb1
select tb1_seq.nextval, ename from emp;已创建14行。已用时间: 00: 00: 00.03