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: Can I lock a Row in a Oracle Table ?

Re: Can I lock a Row in a Oracle Table ?

From: Nicolas Bronke <news_at_TRINITY.de>
Date: Fri, 30 Apr 1999 09:55:05 +0200
Message-ID: <3729617c@news.uk.ibm.net>

Thomas Kyte <tkyte_at_us.oracle.com> schrieb in im Newsbeitrag: 372aff43.2399249_at_192.86.155.100...
> >Can I lock a Row in a Oracle Table ? Or how can I handle one record
> >being change by two users ?
>
> select * from T where pk = value FOR UPDATE;
>
> will lock the row(s) selected.
>

and with the option nowait it will be returned a error-code immediatly whether the record is already locked. Otherwise this command wait until the record is unlocked.
Regards
Nicolas Bronke Received on Fri Apr 30 1999 - 02:55:05 CDT

Original text of this message

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