For update issues in subquery

  • From: "Harvinder Singh" <Harvinder.Singh@xxxxxxxxxxxxx>
  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 14 Feb 2007 16:33:10 -0500

Hi,

 

We are trying to lock the row in select before the update and need to
get only 1 row back.

 

For example this code is not working:

 

Create table dd1(dd int, dd1 int, dd2 int)

Insert into dd1 values(1,2,3);

 

select dd from

(select dd from dd1 order by dd1 asc for update)

where rownum < 2

ORA-00907: missing right parenthesis

 

Is there any way we can use the for update clause in subquery?

 

Thanks

--Harvinder

 

Other related posts: