declare temp number; begin for temp in 1..10000 loop INSERT INTO xx(a) values ('1'); commit; end loop; end;
谢谢,但是set temp=1这样的语句怎么弄呢?
WHILE Temp < 10000 ?
怎么都觉得回答和问题不太一样呢? 赫赫. declare temp number; begin for temp in 1..10000000 loop if temp mod 10000 = 0 then INSERT INTO xx(a) values ('1'); commit; end if end loop; end;
temp number;
begin
for temp in 1..10000 loop
INSERT INTO xx(a)
values ('1');
commit;
end loop;
end;
赫赫.
declare
temp number;
begin
for temp in 1..10000000 loop
if temp mod 10000 = 0 then
INSERT INTO xx(a) values ('1');
commit;
end if
end loop;
end;
你这一句改成
temp := temp + 1;