如何在C#中的Oracle表中执行更多操作
"
Insert into table values (1,'A')
Insert into table values (2,'Ab')
Insert into table values (3,'Ac')
Insert into table values (4,'At')
....
"
答案 0 :(得分:2)
你的问题是含糊不清。如果您想要插入单个查询并插入许多记录,请尝试insert + select
语法:
Best way to do multi-row insert in Oracle?
在你的情况下
insert into MyTable(id, name)
select 1, 'A' from dual
union all select 2, 'Ab' from dual
union all select 3, 'Ac' from dual
union all select 4, 'At' from dual
如果您想合并多个查询,请尝试将它们放入匿名区块:
begin
insert into MyTable values (1,'A');
insert into MyTable values (2,'Ab');
insert into MyTable values (3,'Ac');
insert into MyTable values (4,'At');
...
end;