Re: How to so select on sequence ?

From: Robert E. Poffel, III <rpoffel_at_tradeinfo.com>
Date: 1996/09/18
Message-ID: <01bba5bb$17e4f950$4ae6b3c6_at_rpoffel>#1/1


Shinu,

Without pulling out the manual I think it's:  

   Select seq.nextval from dual

if you're working in PL/SQL then you'll want to use:

   Select seq.nextval into yourVar from dual

hope this helps

Rob

Shinu Gupta <shinu_at_openix.com> wrote in article <51plpv$nsj_at_spasmolytic.openix.com>...
> Hi:
>
> I am rather new to Oracle. I am currently using sequences for generating
 unique
> numbers. I am able to use seq.nextval and seq.currval successfully in
 insert
> and update statements.
>
> I want to do a select on the sequence, increment the value and save the
 value
> in a variable. The book says that I can do select on a sequence - but i
 can't
> figure out how.
>
>
> select nextVal from seq
>
> fails.
>
> Shinu Gupta
>
  Received on Wed Sep 18 1996 - 00:00:00 CEST

Original text of this message