简单范例 create or replace procedure delete_table is i number(10); begin for x in (select * from emp where DEPTNO like 'a%') loop delete emp where emp.id = x.id i:=i+1; if i>1000 then commit; i:=0; end if; end loop; exception when others then dbms_out.pu…