title: Compare two sql server tables
body: <p>Can anyone suggest me how to compare two database tables in sql server and return the rows in the second table which are not in the first table. The primary key in both the tables is not the same. For instance, the tables are as follows.</p>
  
  <p>Table1</p>
  
  <pre><code>ID             Name               DoB
  1              John Doe           20/03/2012
  2              Joe Bloggs         31/12/2011
  </code></pre>
  
  <p>Table2</p>
  
  <pre><code>ID             Name                DoB
  11             John Doe            20/03/2012
  21             Joe Bloggs          31/12/2011
  31             James Anderson      14/04/2010
  </code></pre>
  
  <p>The sql query should compare only the Name and DoB in both tables and return 
  31 James Anderson 14/04/2010</p>
  
  <p>Thanks.</p>