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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get the ID of the last inserted row

Re: How to get the ID of the last inserted row

From: Richard Kuhler <noone_at_nowhere.com>
Date: Tue, 30 Sep 2003 22:51:20 GMT
Message-ID: <INneb.33101$5z.5834@twister.socal.rr.com>


Daniel Morgan wrote:
<snip>
>> I was referring to the possibility that a trigger could select another
>> value from the sequence between the time the value for the insert is
>> selected and your currval select. In that situation you won't get the
>> value you're probably expecting.
>>
>>
>> Richard Kuhler
>>

> Of course you will. You always get back the last value from your own > session. Oracle is not a single-user database.

I guess I should have been clearer there. I'm referring to a trigger firing IN THE SAME SESSION that may use the sequence a second time within the duration of what the application perceives to be a single insert.

Richard Kuhler Received on Tue Sep 30 2003 - 17:51:20 CDT

Original text of this message

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