插入具有多个值的多行 nextval Oracle SQL
Insert multiple rows with multiple values nextval Oracle SQL
我正在尝试将具有多个值的 2 行和 test_id.nextval 插入现有数据框中,而不在代码中包含列标题:
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
。
如何将多行插入到现有的 table 和 nextval ids?
试试这个:
insert into x
select tt.* , test_id_seq.nextval from
(select 12345, 'text' from dual
union all
select 23589, 'other text' from dual) tt;
我正在尝试将具有多个值的 2 行和 test_id.nextval 插入现有数据框中,而不在代码中包含列标题:
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
。
如何将多行插入到现有的 table 和 nextval ids?
试试这个:
insert into x
select tt.* , test_id_seq.nextval from
(select 12345, 'text' from dual
union all
select 23589, 'other text' from dual) tt;