Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Lock 1 Row in a table.

Re: Lock 1 Row in a table.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 15 Feb 1999 14:40:40 GMT
Message-ID: <36c831b6.7844109@192.86.155.100>


A copy of this was sent to tim.mcconechy_at_runtime.dk (if that email address didn't require changing) On Mon, 15 Feb 1999 13:45:45 GMT, you wrote:

>Hi! How do I lock 1 row in a table?
>From an ODBC Connection.

select * from T where (primary_key) = (some_value) FOR UPDATE;

>
>COnversly how do I test if this 1 row is locked?
>

select * from T where (primary_key) = (some_value) FOR UPDATE NOWAIT;

if it fails, row is locked by someone else. if it succeeds, row is now locked by you.

>Thanks for any advice or pointers to advice
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

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  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Feb 15 1999 - 08:40:40 CST

Original text of this message

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