Oracle批量插入数据的三种方式【推荐】
程序员文章站
2023-11-16 15:27:04
第一种:
begin
insert into tablename(column1, column2, column3...) values(value1,v...
第一种:
begin insert into tablename(column1, column2, column3...) values(value1,value2,value3...); insert into tablename(column1, column2, column3...) values(value1,value2,value3...); insert into tablename(column1, column2, column3...) values(value1,value2,value3...); ... end;
第二种:
insert into tablename(column1, column2, column3...) values(value1,value2,value3...); insert into tablename(column1, column2, column3...) values(value1,value2,value3...); insert into tablename(column1, column2, column3...) values(value1,value2,value3...);
第三种(利用中间表):
insert into tablename(column1(主键),column2,column3...) select tablenames_seq.nextval,,column2,column3... from ( select value1 column2,value2 column3,value3 column4 from dual union select value1 column2,value2 column3,value3 column4 from dual union select value1 column2,value2 column3,value3 column4 from dual union select value1 column2,value2 column3,value3 column4 from dual )
总结
以上所述是小编给大家介绍的oracle批量插入数据的三种方式,希望对大家有所帮助
上一篇: 哪些企业微博营销做得好?