Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to get seq.currval without using nextval?
nsouto_at_optushome.com.au.nospam (Nuno Souto) wrote in message news:<3bc1a5ac.8712764_at_news>...
> On 8 Oct 2001 05:44:33 -0700, gwhubert_at_hotmail.com (Gene Hubert)
> wrote:
>
> >
> >Is there any way around this or am I forever vexed?
> >
>
> Have you tried a select from ALL_SEQUENCES, or USER_SEQUENCES?
This will not give you what you want. Sequence values are cached (or at least can be - I can't remember if Oracle caches by default) and what you get from *_SEQUENCES (in the LAST_NUMBER field) is the last cached value not the last sequence number generated, which I assume is what is desired.
Jim Lyons Received on Mon Oct 08 2001 - 12:48:46 CDT