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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to get gap values in the range of numbers

776822Jun 14 2010 — edited Jun 15 2010
Is it even possible with single SQL query to get the list of numbers that are not in the column
Let's say I have a column Customer ID with values 2,3,6,7,11,12
Is it possible to write single SQL select statement that will return list of numbers that are missing:
1,4,5,8,9,10?

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 13 2010
Added on Jun 14 2010
8 comments
4,362 views