我试图将2行具有多个值的行和test_id.nextval插入到现有的dataframe中,而不包括代码中的列标题:
insert into x
select * from
(select 12345, 'text', test_id_seq.nextval from dual
union all
select 23589, 'other text', test_id_seq.nextval from dual);我得到了错误:sequence number not allowed here。所以我删除了序列号。然后发生错误not enough values。如何将多行插入到具有nextval ids的现有表中?
发布于 2017-04-27 16:23:51
试试这个:
insert into x
select tt.* , test_id_seq.nextval from
(select 12345, 'text' from dual
union all
select 23589, 'other text' from dual) tt;https://stackoverflow.com/questions/43662946
复制相似问题