title: SQL query to find Missing sequence numbers
body: <p>I have a column named <code>sequence</code>. The data in this column looks like 1, 2, 3, 4, 5, 7, 9, 10, 15.</p>
  
  <p>I need to find the missing sequence numbers from the table. What SQL query will find the missing sequence numbers from my table? I am expecting results like</p>
  
  <pre><code>Missing numbers
  ---------------
  6  
  8  
  11  
  12  
  13  
  14  
  </code></pre>
  
  <p>I am using only one table. I tried the query below, but am not getting the  results I want.</p>
  
  <pre><code>select de.sequence + 1 as sequence from dataentry as de 
  left outer join dataentry as de1 on de.sequence + 1 = de1.sequence
  where de1.sequence is null  order by sequence asc;
  </code></pre>