Oracle 存儲過程刪除大表記錄:
create or replace procedure whxd
as
begin
loop
delete from sj where t<to_date('2011-07-12 10:40:49','yyyy-mm-dd hh24:mi:ss') and rownum<1000;
-
exit when SQL%ROWCOUNT=0;
commit;
end loop;
exception
when others then
rollback;
return;
end;
本文出自:億恩科技【www.vbseamall.com】
服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]
|