Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting currval from a sequence with out incrementing nextval
Cgl3863 wrote:
> Typical of DBA's!!!: over complicating a simple question
> if you want the to find the current number of a given Sequence
>
> SELECT last_number FROM ALL_SEQUENCES Where Sequence_name='sequence
> name'
>
> from lazy developer
>
>
Typical of developers to think they know more than the DBA...and too lazy to read the docs....
The LAST_NUMBER column from ALL_SEQUENCES (straight from the docs) is defined as:
"Last sequence number written to disk. If a sequence uses caching, the number written to disk is the last number placed in the sequence cache. This number is likely to be greater than the last sequence number that was used."
Take special that the number is "likely to be greater than the last sequence number that was used".
Cheers!
Brian
-- =================================================================== Brian Peasland oracle_dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Mon May 01 2006 - 12:54:32 CDT
![]() |
![]() |