Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Delete a row fetched by a cursor in a cursor loop

Delete a row fetched by a cursor in a cursor loop

From: Albert Dupond <ad_at_ad.com>
Date: Mon, 02 Aug 2004 17:21:10 +0200
Message-ID: <410e5be7$0$31401$636a15ce@news.free.fr>


Hello,

I small example would be better than a lot of words. Can I do this ?

<<<
declare

   cursor myCursor is select objectid from myTable where value = 'TEST'; begin

   for myRecord in myCursor loop

      delete from myTable where objectid = myRecord.objectid;
      commit;

   end loop;
end;
>>>

I would really appreciate to be able to do this but I am afraid of side effects, because I modify the cursor data set during its usage.

Which precaution must I take ? Any advice welcome.

Thanks a lot

AD Received on Mon Aug 02 2004 - 10:21:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US