title: Problem with "NOT IN" in a simple SQL query
body: <p>I need to find all id's from the OldTable that doesn't exist in the NewTable<br>
  Why won't this query find the id?  </p>
  
  <pre><code>SELECT old_id FROM OldTable WHERE old_id NOT IN (
  SELECT id FROM NewTable)  
  </code></pre>
  
  <p>By them selves they return this</p>
  
  <pre><code>--Returns the id 18571
  SELECT old_id FROM OldTable WHERE old_id = 18571
  
   --Returns nothing  
  SELECT id FROM NewTable WHERE id = 18571 
  </code></pre>
  
  <p>Am I missing something obvious here?  </p>
  
  <p>Both columns are of type <code>int</code> and primary keys.  </p>
  
  <p><strong>SOLVED</strong>  </p>
  
  <p><em>The id column had null's in them, I was just being ignorant =/</em></p>
  
  <p>These works:  </p>
  
  <pre><code>SELECT old_id FROM OldTable EXCEPT SELECT id FROM NewTable  
  
  SELECT * FROM old_table ot WHERE NOT EXISTS (
  SELECT * FROM new_table nt WHERE nt.id = ot.old_id)  
  </code></pre>
  
  <p>These doesn't work:  </p>
  
  <pre><code>SELECT old_id FROM OldTable LEFT JOIN NewTable ON old_id = id WHERE id IS NULL  
  
  SELECT old_id FROM OldTable WHERE old_id NOT IN (
  SELECT id FROM NewTable)
  </code></pre>