Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

user_sequences last_number column

user5716448Mar 5 2015 — edited Mar 6 2015

Hi,

Using 11.2.0.3 and following sql

select last_number

        from user_sequences u

        where u.SEQUENCE_NAME ='<sequence_name>'

This alst_number ios actually the number which would be retrieved by doing

select sequence_name.nextval

from dual

Why is this ths case - why is last_number not the actual_last number used.

On this basis looks like we would need to use last_number -1 to get the real last number used

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2015
Added on Mar 5 2015
26 comments
5,320 views