title: SQL, Matching Rows Across Multiple Tables
body: <p>If I have two tables, A and B which have identical layout of:</p>
  
  <ul>
  <li>Forename</li>
  <li>Middlename</li>
  <li>Surname</li>
  <li>Date of Birth</li>
  </ul>
  
  <p>Table A contains my data, table B contains data I wish to compare to table A.</p>
  
  <p>I'd like to return all matches that are full matches (Forename, Middlename and Surname) as well as partial matches (First initial, surname, dob).</p>
  
  <p>What would be the most efficient way of doing this and being able to distinguish between the two? </p>
  
  <p>My initial thoughts  are that I could do this with two passes however there must be a more efficient way as over a large number of records this could be quite inefficient.</p>