Re: Meaning for Nextval
Date: Mon, 25 May 1998 18:06:58 +0200
Message-ID: <35699722.3EFF41C3_at_fs-edv.de>
XXXX wrote:
>
> Could somebody help me on "Nextval" means? I could not find the
> meaning or
> usauge in the regular Oracle books.
>
> Thanks in advance.
>
> Subra
Sequences can be accessed in (PL/)SQL somewhat like (package-)
functions.
As far as i know, they consist of two pseudo-functions: NEXTVAL and
CURRVAL. NEXTVAL is the next value of the sequence, CURRVAL the last
used - but caution: a new created sequence has no CURRVAL yet. Trying to
get it produces an error message.
You can use sequences like this:
SELECT sequencename.NEXTVAL INTO :var FROM DUAL; for a new sequence-value or
SELECT sequencename.CURRVAL INTO :var FROM DUAL; to re-get the last.
hope it helps.
Arnold Received on Mon May 25 1998 - 18:06:58 CEST