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

Home -> Community -> Mailing Lists -> Oracle-L -> For update issues in subquery

For update issues in subquery

From: Harvinder Singh <Harvinder.Singh_at_MetraTech.com>
Date: Wed, 14 Feb 2007 16:33:10 -0500
Message-ID: <D6424CD4C8A3C044BBC49877ED51C51804E027CE@ex2003.metratech.com>


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
 

--

http://www.freelists.org/webpage/oracle-l Received on Wed Feb 14 2007 - 15:33:10 CST

Original text of this message

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