Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SELECT .....FOR UPDATE vs LOCK TABLE ... IN ROW SHARE MODE

sgalaxyOct 5 2008 — edited Oct 8 2008

Hi,
Practically , is there any difference between the two versions of row locking methods...????
In my case i need to lock only the rows which are going to be fetched by a cursor...but because the select stmt uses the sum aggregate function... I cannot use the format:

cursor c1 
 is
  select x , y ,sum(a)
    from d
   group by x,y
    for update;

So , the only alternative i have (i think) is the "LOCK TABLE d IN ROW SHARE MODE"
Is the above correct...so as to get the same row locks as the "select .... for update"????

Note: I use Db10g v.2
Thanks ,
Sim

This post has been answered by Nicolas Gasparotto on Oct 5 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2008
Added on Oct 5 2008
17 comments
5,307 views