Thanks for the question, Chaitanya.
Asked: June 03, 2017 - 12:05 pm UTC
Last updated: June 05, 2017 - 5:01 am UTC
Version: 11g
Viewed 1000+ times
SQL> create table t as select * from dba_objects; Table created. SQL> create index ix on t ( object_name ); Index created. SQL> SQL> declare 2 cursor c is select * from all_objects; 3 4 type clist is table of c%rowtype; 5 l_rows clist; 6 begin 7 8 open c; 9 fetch c bulk collect into l_rows; 10 close c; 11 12 forall i in 1 .. l_rows.count 13 delete from t 14 where object_name = l_rows(i).object_name; 15 end; 16 / PL/SQL procedure successfully completed.
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library