循环插入记录,id每次加1
sql语句写法:
begin
for i in 1 .. 100
loop
insert into table_name values(....);
end loop;
commit;
end;
例子:
begin
for i in 1 .. 100
loop
insert into toilet values(i+1,null,'张三');
end loop;
commit;
end;
sql语句写法:
begin
for i in 1 .. 100
loop
insert into table_name values(....);
end loop;
commit;
end;
例子:
begin
for i in 1 .. 100
loop
insert into toilet values(i+1,null,'张三');
end loop;
commit;
end;