1. 程式人生 > >oracle與mysql資料庫批量插入資料

oracle與mysql資料庫批量插入資料

批量插入資料時,入坑了,特總結如下:

mysql資料庫批量插入方法sql:

INSERT INTO users(name, age) VALUES('ccc', 333), ('aaa', 222), ('bbb', 111);

oracle資料庫批量插入方法sql:

 insert all 
into ELECTRONIC_CONTRACT_OPTIONS  values ('SY8656', 'OT3', '0', '0', NULL, NULL, NULL, NULL) 

into ELECTRONIC_CONTRACT_OPTIONS  values ('SY8656', 'OT1', '0', '0', NULL, NULL, NULL, NULL)
into ELECTRONIC_CONTRACT_OPTIONS  values ('SY8656', 'OT6', '0', '0', NULL, NULL, NULL, NULL)

……
select 1 from dual;