SQL一次性插入多条记录

阅读更多
SQL的批量插入MYSQL
如:
insert into book(id, name) values (1, '冰与火之歌'),(2, '动物庄园')


ORACLE:
insert into book(id,name) select 1, '冰与火之歌' from dual union select 2, '动物庄园'  from dual

如果要自动插入序列
insert into book(id, name) select seq.nextval, name from (select '冰与火之歌' as name from dual union select '动物庄园' as name from dual)

你可能感兴趣的:(SQL批量插入,批量插入,insert批量插入,insert)