目录
1oracle中使用如下语句
1.1方式一
该方式特点是能插如值是固定的多条数据
insert all
into test01 values(1,'a')
into test01 values(2,'b')
select 1 from dual; --这一行不能去掉,但是不知道有什么用
1.2方式二
该方式特点是:能插入一些值不是固定的多条数据.可以吧其他表中的数据批量保存到这张表中来
insert into test01 (id,line1)
select id,line1 from test02;
1.3方式三
放在begin end里面如下:
begin
insert into test01 (id,line1) values (01,'line01');
insert into test01 (id,line1) values (01,'line01');
insert into test01 (id,line1) values (01,'line01');
insert into test01 (id,line1) values (01,'line01');
end;
2mysql使用如下语句
insert into test01 (id,line1) values (01,'line01'),(02,'line02');