Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Tagged as

How to find a gap in the table between min and max value using pure SQL

, 14 Nov 2012 CPOL
Here is my tableTable1ID Sequence1 11 31 41 61 81 10and i want this following output2579I've tried thisSELECT Sequence FROM Table1 WHERE Sequence NOT IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10') and ID ='1'but it not works.

Revisions


  

Compare Revision Minor Date Status Editor
3 - publicly available Yes 14-Nov-12 20:24 Available Andrew Cherednik
Title
2 No 13-Nov-12 4:48 Available __TR__
Updates in content.
1 No 13-Nov-12 4:46 Available sahabiswarup

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

sahabiswarup
Software Developer Rumtek Technologies
India India
You may check about me at www.dotnetcode.net
contact email biswarup@rumtekinfo.com

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141216.1 | Last Updated 14 Nov 2012
Article Copyright 2012 by sahabiswarup
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid