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: <mlwong_at_my-dejanews.com>
Date: Fri, 30 Apr 1999 22:08:29 GMT
Message-ID: <7gd9kr$iec$1@nnrp1.dejanews.com>


I tried to run something like the following:   select x,y,z into xvar,yvar,zvar

     from tablea
     where a=value and b=value for update;

Oracle returned a message saying 'FOR UPDATE' is not allowed in this statement.

Any ideas?

In article <372aff43.2399249_at_192.86.155.100>,   tkyte_at_us.oracle.com wrote:
> A copy of this was sent to Marco Andre <mandre_at_ism.com.br>
> (if that email address didn't require changing)
> On Thu, 29 Apr 1999 20:41:59 -0300, you wrote:
>
> >Can I lock a Row in a Oracle Table ? Or how can I handle one record
> >being change by two users ?
> >
> >thanks.
>
> select * from T where pk = value FOR UPDATE;
>
> will lock the row(s) selected.
>
> Thomas Kyte
> tkyte_at_us.oracle.com
> Oracle Service Industries
> Reston, VA USA
>
> --
> http://govt.us.oracle.com/ -- downloadable utilities
>
> ----------------------------------------------------------------------------
> Opinions are mine and do not necessarily reflect those of Oracle Corporation
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Apr 30 1999 - 17:08:29 CDT

Original text of this message

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