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 -> Locks rows

Locks rows

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Mon, 20 Jan 2003 11:26:33 -0000
Message-ID: <E2F6A70FE45242488C865C3BC1245DA7033105D2@lnewton.leeds.lfs.co.uk>


Bonjour Francky,

(Sorry for my French, I'm Scottish !)

Try this :

select whatever
from tablename
where condition
FOR UPDATE; Now, if there are no locks on those rows, you have selected and locked them. When you rollback or commit, the locks will be released. As usual, the where clause is optional, but if you want to lock the entire table you could use :

lock tablename in <lockmode> mode;

Where lockmode is the required mode.

au revoir,
Norman.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com

-------------------------------------

-----Original Message-----
From: Francky [mailto:fservantroumey_at_hotmail.com] Posted At: Monday, January 20, 2003 11:03 AM Posted To: server
Conversation: Locks rows
Subject: Locks rows

Hello,

Sorry for my bad english... I'm French

I would like lock rows in table with a select instruction because i dont want that 2 user read simultaneous the data

Thank's Received on Mon Jan 20 2003 - 05:26:33 CST

Original text of this message

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