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: Any way to get seq.currval without using nextval?

Re: Any way to get seq.currval without using nextval?

From: Jim Lyons <jlyons_at_weblyons.com>
Date: 8 Oct 2001 10:48:46 -0700
Message-ID: <e67857c9.0110080948.2886531f@posting.google.com>


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

Original text of this message

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