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!

How to list gaps in sequence id

Beauty_and_dBestJan 22 2017 — edited Jan 24 2017

Hi ALL,

Oracle 11gR2

OL6

I have student_id column in my STUD table generated by student_seq.

I want to reuse sequence id gaps to save the number system.

How do I list the unused numbers or the gaps?

For example, my student_id has values:

1

3

4

6

12

How do I select 2,5,7,8,9,10,11?

Please help...

Kind regards,

jc

This post has been answered by Beauty_and_dBest on Jan 22 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2017
Added on Jan 22 2017
32 comments
4,560 views