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 do you return a generated SEQUENCE?

Re: How do you return a generated SEQUENCE?

From: Craig M. Wall <cwall_at_petersons.com>
Date: 1997/11/05
Message-ID: <63pufa$32s@news9.noc.netcom.net>#1/1

SQL> select sequence_name.currval from dual; Will give you the value of the just inserted sequence number in the same user session. Use this value to populate detail rows. It will be valid until another nextval is called within the same session from the sequence generator, regardless of what values are being generated for other sessions from this sequence.

Regards,
Craig M. Wall

Neal Hill wrote in message <345fd811.547208213_at_news>...
>Hello, we have a problem that perhaps someone else has come across and
>solved:
>
>We have an insert trigger that is setting a field with a generated
>sequence number. We need to know what that generated sequence number
>was after the trigger finished updating the field, so that the client
>may keep that as a key.
>
>If anyone has a solution please post and reply via email.
>
>ADthanxVANCE,
>
>Neal Hill
>nhill_at_exchange.ml.com
>Municipal Systems and Technologies,
>Merrill Lynch,
>New York, NY
>
Received on Wed Nov 05 1997 - 00:00:00 CST

Original text of this message

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