I have a use case where I want to update multiple records in two different tables in one go. The records may be well over 3000 or 5000. I tried doing it with PL/SQL code. The code is working fine except for the fact that it updates only 1000 records. If the records are over 1000, it doesnt do anything. Below is my sql cursor :
declare
cursor book_update IS
Select book_id from books where bookNumber IN ('1','2','3','4','5','6','7','8','9' .......... '1003');
begin
for bk in book_update loop
update author set active='true' where book_id=bk.book_id;
update books set is_available=1 where book_id = bk.book_id
end loop;
end;
/
Is there any way by which I can update any number of records put to a sql cursor ?
Thanks