您的位置:首页 > 其它

批量删除数据

2015-10-26 20:13 246 查看
declare
cursor mycur is select qb1.rowid from qb1,qb2 where qb1.t_pad=qb2.t_pad order by rowid;
type rowid_table_type is table of rowid index by pls_integer;
v_rowid rowid_table_type;
begin
open mycur;
loop 
fetch mycur bulk collect into v_rowid limit 300;
exit when v_rowid.count=0;
forall i in v_rowid.first..v_rowid.last
delete from qb1 where rowid=v_rowid(i);
commit;
end loop;
close mycur;
end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: