title: How to find a gap in range in SQL
body: <p><a href="https://stackoverflow.com/questions/1312101/how-to-find-a-gap-in-running-counter-with-sql">This question</a> explains how to find the first "unused" number in a table, but how can I find the same so that I can define extra constraints. How do I alter the query so that I get the first unused number after that's greater than 100</p>
  
  <p>e.g. If I have 23, 56, 100, 101, 103 in my table i should get 102.</p>