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 schrieb:
> 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 *lazy* developers, to give a wrong followup to a correct
answer ...
PS. ( and yes , you can try to compare the numbers after
create sequence s;
select s.nextval from dual;
select s.currval from dual;
select last_number FROM ALL_SEQUENCES Where Sequence_name='S';
)
Best regards
Maxim Received on Mon May 01 2006 - 13:04:13 CDT