Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I lock a Row in a Oracle Table ?
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