Hi ,

I am having a strange problem with Oracle Sequences.

Database :Oracle
Version:8.1.6

These are the steps how i encountered the problem.

CREATE SEQUENCE TEST_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 25 MINVALUE 1

SELECT TEST_SEQ.NEXTVAL FROM DUAL;
NextVal
----------
1
....
.........
SELECT TEST_SEQ.NEXTVAL FROM DUAL;
NextVal
----------
20

SELECT TEST_SEQ.CURRVAL FROM DUAL;
CURRVAL
-----------
20

DROP SEQUENCE TEST_SEQ;

Again I am creating the same Sequence

CREATE SEQUENCE TEST_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 25 MINVALUE 1

SELECT TEST_SEQ.CURRVAL FROM DUAL;
CURRVAL
-----------
20

Eventhough I dropped the sequence and I created it again the currval for the first time is showing the same old incremented sequence value. If I select the NEXTVAL from there onwards the currval will be initialised to new value.

Is this a desired behaviour Or it it a Oracle Bug ??

Your comments are greatly appreciated.

Thanks In Advance,
Sekhar Modem.