create or replace procedure name_pro as cursor t_sor is select * from table_name where ...; num number:=1; begin for v_sor in t_sor loop update table_name set col1=v_sor.col1 where ...; num:=num+1; if num=1000 then commit; end if; end loop; end name_pro;具体每隔1000就commit一次,自已做过算法吧
as
cursor t_sor is
select * from table_name where ...;
num number:=1;
begin
for v_sor in t_sor loop
update table_name set col1=v_sor.col1 where ...;
num:=num+1;
if num=1000 then
commit;
end if;
end loop;
end name_pro;具体每隔1000就commit一次,自已做过算法吧