Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get the ID of the last inserted row
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