批量删除 lizhiyong 2019-02-14 133 阅读1分钟 declare cnt NUMBER:=0; i NUMBER; begin select count(*) INTO cnt from test_table; for i IN 1..TRUNC(cnt/100)+1 loop delete from test_table t where rownum<=100; commit; end loop; end; /