首页 > Linux操作系统 > Linux操作系统 > 批量提交要修改的记录
declare
type rowids is table of rowid;
cursor c is
select rowid from test1 where 你要update的条件;
v_rowid rowids;
begin
open c;
loop
fetch c bulk collect
into v_rowid limit 100000;--控制提交的记录条数
forall i in 1 .. v_rowid.count
update test1 a set /*update 字段*/ where a.rowid = v_rowid(i);
commit;
exit when c%notfound;
end loop;
close c;
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25671596/viewspace-705955/ ,如需转载,请注明出处,否则将追究法律责任。