Hi,

I don't know whether this is bug or not, but it seems to be a problem that the sequence is being cached. This is the default behavior, and the default cache size is 20 that explains why the second 'NEXTVAL' returns 20.

You may try to issue a 'COMMIT' after you drop the sequence and test again, if fail, you can try to alter/create the sequence with 'NOCACHE' option.

Eddy Ng