Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting current sequence value
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.---