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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to lock a column not the enire row ?

Re: How to lock a column not the enire row ?

From: Daniel W. Fink <optimaldba_at_yahoo.com>
Date: Mon, 21 Apr 2003 10:51:40 -0800
Message-ID: <F001.005861BA.20030421105140@fatcity.com>


The syntax is valid, unfortunately, it does not really lock a column. The finest granularity is the row. Only 1 process can update a row at any given time. Once the lock is released, then another process can update the row. This occurs even if the processes are updating different columns. The reason is that Oracle maintains the lock byte (flag) at the row level, not at the column level.

-- 
Daniel W. Fink
http://www.optimaldba.com

IOUG-A Live! April 27 - May1 , 2003 Orlando, FL
   Thursday, May1 1 :00pm -2 :00pm - Automatic Undo Internals



DENNIS WILLIAMS wrote:


>Salaheldin
> Here is the text in the Oracle manual:
>FOR UPDATE
>
>[OF [[schema .] { table | view } .] column
>
> [, [[schema .] { table | view } .] column]...
>
>]
>
>[ NOWAIT | WAIT integer ]
>I found this by going to technet.oracle.com and searching. I hadn't realized
>that you could just lock a column.
>I don't know if it really works or not, but this is what the documentation
>specifies.
>
>
>Dennis Williams
>DBA, 40%OCP, 100% DBA
>Lifetouch, Inc.
>dwilliams_at_lifetouch.com
>
>-----Original Message-----
>Sent: Monday, April 21, 2003 10:22 AM
>To: Multiple recipients of list ORACLE-L
>
>
>hi all,
>
>I remember that oracle has ability to lock not just the entire row, but a
>specific column in this row.
>How to do this ?
>
>When I use:
>"SELECT <column>
> FROM <table>
> FOR UPDATE OF <column>"
>the entire row is locked so, how to lock a column not the enire row ?
>
>
>Regards,
>Salaheldin Aboali
>--------------------------------------
>Senior Software Developer
>Management Information Systems
>--------------------------------------
>http://www.mis-kuwait.com <http://www.mis-kuwait.com>
>
>
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Daniel W. Fink INET: optimaldba_at_yahoo.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Mon Apr 21 2003 - 13:51:40 CDT

Original text of this message

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