Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: need code for Bulk inserts
Here is the bulk delete code
SQL> CREATE OR REPLACE PROCEDURE P_BULKDEL as
2 TYPE ARRAY_ROWID IS TABLE OF VARCHAR2(100) INDEX BY
BINARY_INTEGER;
3 tbrows ARRAY_ROWID;
4 row PLS_INTEGER;
5 cursor delete_table is select rowid from T_BULKDEL;
6 BEGIN
7 open delete_table;
8 loop
9 fetch delete_table bulk collect into tbrows limit 100; 10 FORALL row IN 1 .. tbrows.count() 11 DELETE T_BULKDEL WHERE rowid = tbrows(row); 12 -- tbrows.delete(1,tbrows.count()); 13 exit when delete_table%notfound;14 end loop;