Re: Delete Cursor: What To Use In Select Clause?
Posted in 1996
Jon Machtynger wrote: > > tvarnas@compulink.gr (Apostolos Varnas) wrote: > > > >another reason could be that he wants firstly to obtain a lock on the record > >he wants to delete before actually deleting it. > > I would have thought that the DELETE would have taken a lock before > deleting it... How could you delete it otherwise? Of course the delete statement places a lock before actually deleting the record.What I meant is that sometimes it is required to firstly obtain the lock then do some actions and then issue the delete statement.This can be accomplished by using a cursor for update because at the moment a record is fetched through the cursor a lock is placed on it. We had often developed applications where we have coded this way. Regards Tolis +---------------------------------------------------------------------+ | V+K Relational Solutions email: tvarnas@compulink.gr | | Deligiorgi 26 tvarnas@orbit.de | | 546 42 Thessaloniki Voice: (30) 31 820270 | | Greece Fax: (30) 31 865463 | +---------------------------------------------------------------------+