You are on page 1of 1

OPCION 1

================================================================================
=================
DELETE FROM table_to_delete
WHERE ID in (SELECT ID FROM table_with_ids WHERE ROWNUM < 100000);
DELETE FROM table_with_ids WHERE ROWNUM < 100000;
COMMIT;
OPCION 2
================================================================================
=================
-- select rowid from t_objetos;
Declare
TYPE ARRROWID IS TABLE OF ROWID INDEX BY BINARY_INTEGER;
tbrows ARRROWID;
row PLS_INTEGER;
cursor cursor_tabla is select rowid from t_objetos t where t.object_type = 'SY
NONYM';
BEGIN
open cursor_tabla;
loop
fetch cursor_tabla bulk collect into tbrows limit 250;
FORALL row IN 1 .. tbrows.count()
DELETE t_objetos t WHERE rowid = tbrows(row);
commit;
-- dbms_lock.sleep(1); /* if delete too fast */
exit when cursor_tabla%notfound;
end loop;
close cursor_tabla;
END;

You might also like