Re: reusability of rowid
From: Tommy Wareing <p0070621_at_oxford-brookes.ac.uk>
Date: Wed, 29 Jun 1994 09:50:40 GMT
Message-ID: <Cs5KoH.AHM_at_uk.ac.brookes>
Date: Wed, 29 Jun 1994 09:50:40 GMT
Message-ID: <Cs5KoH.AHM_at_uk.ac.brookes>
Baby Mars All Alone in Hong Kong (mars_at_hk.super.net) wrote:
> Is it true that if a particular record is deleted, oracle will reuse
> the rowid of that record for subsequent insertions of new records ?
Yes.
> What is the frequency of such events happening ? I need to update certain
> records using the rowid but the problem is that the rowid is extracted
> earlier and I am afraid that by the time I update the record, I may be
> updating the wrong record because that record may have already been deleted
> and replaced by another person.
When you query the record, use the FOR UPDATE OF clause. This will lock the record, preventing anyone else from changing (updating or deleting) it.
-- _________________________ _______________________________ / Tommy Wareing \ / 'Happy, happy. Joy, joy!' \ | p0070621_at_brookes.ac.uk X said Ren & Stimpy | \ 0865-483389 / \ (Supplied by Simone, not me!) / ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Received on Wed Jun 29 1994 - 11:50:40 CEST