How would you do it with JDBC? Larry
On Fri, Feb 29, 2008 at 8:29 PM, Srini.Gullipalli <[EMAIL PROTECTED]> wrote: > > How can I achieve this using iBatis. Not sure if this syntax is ANSI SQL, > but Oracle supports this > > UPDATE aQueueTable SET LOCK_IN = 'Y' > WHERE LOCK_IN='N' and ROWNUM < 2 > RETURNING keyColumn INTO :key > > Alternate use of this syntax : > > INSERT INTO aTable (sequenceColumn, otherColumns...) VALUES ( aSeq.NEXTVAL, > values...) RETURNING sequenceColumn INTO :key > > This syntax eliminates an additional round trip to database ( compared to > selectkey ) > > > -- > View this message in context: > http://www.nabble.com/Oracle---INSERT-UPDATE-RETURNING-INTO-tp15772285p15772285.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > >
