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 -> Re: How to get a lock on single row

Re: How to get a lock on single row

From: Manoj Goel <mgoel_at_jps.net>
Date: Wed, 30 Dec 1998 05:21:15 -0800
Message-ID: <368a2984.0@blushng.jps.net>


What we are trying to do is implement a FIFO(first in first out) kind of thing in db.
When 2 users want a new number at the same time I want that there is no conflict
between them because as of now since we don't commit both of them see the same
row and whoever gets it first has to wait till the first user updates the data.

Frank van Bortel wrote in message <368A23D0.455E3EB_at_vnl.nl>...
>
>
>Manoj Goel wrote:
>
>> Hi guys,
>>
>> We are trying to get a lock on a single row so that next query does not
>> see that row.
>> Is it possible to do that in Oracle 7.3.(I don't want to commit as yet
or
>> update the data
>> so that row is excluded)
>>
>
>Oracle will do that automatically - lock the row. Don't quite understand
what
>you're trying to archieve... Any other user will either not see the row
(when
>it is new), or see the old data (when it is in the process of being
updated),
>until committed.
>Excluding from a select is not done via locks, you should use a
where-clause.
>
>Kr, Frank
>
Received on Wed Dec 30 1998 - 07:21:15 CST

Original text of this message

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