Click here to Skip to main content
15,891,253 members
Articles / Programming Languages / SQL

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

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
16 Nov 2012CPOL 0  
select sequence from SequenceTable where sequence NOT IN (select sequence FROM Table1 WHERE id=8)I've created another table named SequenceTable and stored value from 1 to 10 and then applying the above query.

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 16-Nov-12 18:35 Available sahabiswarup
Updates in content. 1 changes had been made.
1 No 14-Nov-12 22:23 Available sahabiswarup

License

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


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

Comments and Discussions