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: Getting current sequence value

Re: Getting current sequence value

From: Philip Chee <philip_at_aleytys.pc.my>
Date: Mon, 29 Mar 99 03:00:24 GMT
Message-ID: <922676424.4547snx@aleytys.pc.my>


In article <36FECA76.A2A8D15A_at_bigfoot.com> dcowles_at_bigfoot.com writes:

>Is there any way to get the current value of a sequence number without
>incrementing it? You can't use currval unless you define the sequence
>for the session by calling nextval first. Is there any way around this?

You might look at dictionary views such as DBA_SEQUENCES or USER_SEQUENCES. Whether the data you get back is valid is another matter though. I suspect that if the sequence is cached CURVAL will not be accurate.

Philip

---=====================================================================---
 Philip Chee: Tasek Corporation Berhad, P.O.Box 254, 30908 Ipoh, MALAYSIA   e-mail: philip_at_aleytys.pc.my Voice:+60-5-545-1011 Fax:+60-5-547-3932    Guard us from the she-wolf and the wolf, and guard us from the thief,
                  oh Night, and so be good for us to pass.
---
 þ 10075.50 þ New Mail not found. Executing Blame Sysop Sequence... Received on Sun Mar 28 1999 - 21:00:24 CST

Original text of this message

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