title: MySQL select rows that do not have matching column in other table
body: <p>I can't seem to figure this out so far. I am trying to join two tables and only select the rows in table A that do not have a matching column in table B. For example, lets assume we have a users table and a sent table.</p>
  
  <p><code>users</code> table has the following columns: <code>id, username</code><br>
  <code>sent</code> table has the following columns: <code>id, username</code></p>
  
  <p>I want to select all rows from <code>users</code> where <code>username</code> does not exist in <code>sent</code> table. So, if <code>tom</code> is in <code>users</code> and in <code>sent</code> he will not be selected. If he is in <code>users</code> but not in <code>sent</code> he will be selected. I tried this but it didn't work at all:</p>
  
  <pre><code>SELECT pooltest.name,senttest.sentname 
  FROM pooltest,senttest 
  WHERE pooltest.name != senttest.sentname
  </code></pre>