Oracle批量插入数据的三种方式【推荐】
第一种:
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 )
总结
相关推荐
oraclemch 2020-11-06
Seandba 2020-08-16
dbasunny 2020-08-16
娜娜 2020-06-22
专注前端开发 2020-10-21
苏康申 2020-11-13
vitasfly 2020-11-12
liuyang000 2020-09-25
FellowYourHeart 2020-10-05
赵继业 2020-08-17
whyname 2020-08-16
拼命工作好好玩 2020-08-15
langyue 2020-08-15
写程序的赵童鞋 2020-08-03
Accpcjg 2020-08-02
tydldd 2020-07-30
好记忆也需烂 2020-07-28