Click here to Skip to main content
13,097,225 members (63,658 online)
Click here to Skip to main content

Tagged as

Stats

2.8K views
2 bookmarked
Posted 12 Nov 2012

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

, 14 Nov 2012
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 14:24 Available Andrew Cherednik
Title
2 No 12-Nov-12 22:48 Available __TR__
Updates in content.
1 No 12-Nov-12 22: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

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170813.1 | Last Updated 14 Nov 2012
Article Copyright 2012 by sahabiswarup
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid