作者:容易 2013-04-02 21:13:03
通过if判断插入的行数执行commit,可以避免大数据插入的时候undo空间不足,导致插入失败。
declare a number:=0;
begin
for i in 1..100000000
loop
a:=a+1;
insert into test values (i,'jaro');
if a>=3000 then
commit;
a:=0;
end if;
end loop;
commit;
end;
One Response