The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question, Girish.
Asked: January 18, 2023 - 11:38 am UTC
Last updated: December 04, 2023 - 2:15 am UTC
Version: 19
Viewed 10K+ times! This question is
delete from large_table where code=888 and id in (select id from small_table OFFSET 100 ROWS FETCH NEXT 100 ROWS ONLY);
delete large_table where code=888 and id in (select id from small_table);
declare cursor cur is select col from large_table where code=888 and id in ( select id from small_table ); type cur_arr is table of cur%rowtype index by pls_integer; arr cur_arr; begin open cur; loop fetch cur bulk collect into arr limit 100 exit when arr.count = 0; forall i in 1 .. arr.count delete large_table where col = arr(i).col commit; end loop; close cur; end;
Abraham Olsen, December 01, 2023 - 10:12 am UTC
<b> cursor cur is delete ... </b>
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!