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 get the current value from a sequence?

Re: How get the current value from a sequence?

From: Craig & Co. <crb_at_amsa.gov.au>
Date: Fri, 3 Dec 2004 08:47:56 +1100
Message-ID: <41af8ddc$0$59184$c30e37c6@ken-reader.news.telstra.net>


Hi all

DA Morgan wrote in response to
> > whats wrong with select seq_name.nextval fom dual?

>One big thing ... that being you just took another number off the
>top of the sequence.

I believe that executing the command

        select seq_name.nextval from dual; does not increment the sequence (the first time), but defines the sequence for the session.

Of course if you executed the above statement AGAIN, then it would increment.

Cheers
Craig.



Craig Burtenshaw
Unix Systems/Oracle Database Administrator Australian Maritime Safety Authority Received on Thu Dec 02 2004 - 15:47:56 CST

Original text of this message

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