title: MySQL - Selecting rows where fields not equal
body: <p>I have a little problem with an SQL query: I have 'TableA' with a field 'TableA.b' that contains an ID for 'TableB'. I want to select all rows from 'TableB' that don't have an ID that equals any field 'TableA.b'. With other words, I need every row from TableB that's not referred to by any row from TableA in field .
  I tried a Query like this :</p>
  
  <pre><code>SELECT DISTINCT TableB.* FROM TableA, TableB Where TableA.b != TableB.ID
  </code></pre>
  
  <p>But the result contains a row that is also returned by the negation, i.e. where both fields have the same value. 
  Any ideas? </p>