Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Lock 1 Row in a table.
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
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