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: Select For Update newbie question.

Re: Select For Update newbie question.

From: Richard Foote <Richard.Foote_at_oracle.com>
Date: Mon, 05 Aug 2002 23:22:48 +1000
Message-ID: <3D4E7C28.6F84F422@oracle.com>


Hi Vchkam,

It actually acquires both (in a sense).

The *rows* being selected are exclusively locked and prevent other processes from acquiring simultaneous row locks.

The *table* is also locked in a Share Table Lock and is basically there to prevent DDL type operations being performed on the table. It actually prevents the table from simultaneously being locked in share row exclusive, row exclusive and exclusive modes.

As always, check out the Concepts manual to find out how Oracle locking model works (tahiti.oracle.com). All the Oracle doco set can be found here, including the SQL reference you're after.

Good Luck

vchkam wrote:

> Hi all,
>
> I am a newbie to the oracle database. Recently, while reading about
> SQL statements, I came across the select for update statement. At
> first, it appears to me that select for update will accquire a row
> share lock. However, in some other places I read, it appears to me
> that select for update actually accquires a row exclusive lock. Can
> someone please tell me which lock does select for update really
> accquires. Also, can anyone tell me if there is a official link for
> Oracle SQL. I found the Oracle9i Application Developer's Guide, but
> it doesn't seem to be what I need, I needed documentations on basic
> Oracle SQL (something on the insert statements, update, etc.). Any
> input would be greatly appreciated. I appologize if I have posted to
> the wrong newsgroup.
>
> Thanks in advance,
>
> Vic


Received on Mon Aug 05 2002 - 08:22:48 CDT

Original text of this message

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