title: SQL Query to compare two tables for names
body: <p>I am building a SQL query which compares two tables A and B by a [name] column and returns the names from table A that are not in table B</p>
  
  <p>Example </p>
  
  <pre><code>Table A
  
  ID Name Address 
  1  A    ABC
  2  B    XYZ
  3  C    PQR
  
  Table B
  ID Name Gender 
  1  A    F
  2  B    M
  3  D    F
  </code></pre>
  
  <p>The query I wrote should return third row from table A as it is not in table B and should exclude all other rows</p>
  
  <p>Following is the query I built</p>
  
  <pre><code>Select * from A oa left join B gp ON oa.name!=gp.name
  </code></pre>
  
  <p>the above doesn't return the results I was expecting. 
  Can this be corrected?</p>