Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence

Re: Sequence

From: <yong321_at_yahoo.com>
Date: Wed, 18 Oct 2000 14:08:29 GMT
Message-ID: <8skasm$q8v$1@nnrp1.deja.com>

Thanks a lot. The nextvalue column is what I want. Some notes:

  1. It's sys.v$_sequences, not sys.v_$sequences. Strange! I find this out by looking at v$fixed_view_definition.
  2. Right after you create the sequence, your sequence is not shown in there. But it's shown in that view as soon as you select yoursequence.nextval from dual or even select yoursequence.currval from dual which gives ORA-8002, but in the latter case, the nextvalue column is null.
--
Yong Huang

(yong321_at_yahoo.com)

In article <971870285.3215.0.nnrp-04.9e984b29_at_news.demon.co.uk>,
  "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote:

>
> sys.v_$sequences (approximately) is an undocumented
> dynamic view which describes the currently cached
> sequences, including either the last value that was granted
> or the next value that will be granted - can't remember
> which at the moment
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Yong Huang wrote in message <8s7lr3$nl1$1_at_news.sinet.slb.com>...
> >By the way, does anybody know a way to show the current or next
> >sequence-generated number without really incrementing the sequence?
Select
> >mysequence.currval from dual won't work unless nextval is already
used above
> >it. Select mysequence.nextval from dual will increment it and
there's no way
> >to decrement (except for dropping and recreating the sequence).
> >
> >Yong Huang
> >yhuang_at_indigopool.com
Sent via Deja.com http://www.deja.com/ Before you buy.
Received on Wed Oct 18 2000 - 09:08:29 CDT

Original text of this message

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