title: What's the best way to join on the same table twice?
body: <p>This is a little complicated, but I have 2 tables. Let's say the structure is something like this:</p>
  
  <pre><code>*Table1*
  ID
  PhoneNumber1
  PhoneNumber2
  
  *Table2*
  PhoneNumber
  SomeOtherField
  </code></pre>
  
  <p>The tables can be joined based on Table1.PhoneNumber1 -> Table2.PhoneNumber, or Table1.PhoneNumber2 -> Table2.PhoneNumber.</p>
  
  <p>Now, I want to get a resultset that contains PhoneNumber1, SomeOtherField that corresponds to PhoneNumber1, PhoneNumber2, and SomeOtherField that corresponds to PhoneNumber2.</p>
  
  <p>I thought of 2 ways to do this - either by joining on the table twice, or by joining once with an OR in the ON clause.</p>
  
  <p><strong>Method 1</strong>:</p>
  
  <pre><code>SELECT t1.PhoneNumber1, t1.PhoneNumber2, 
     t2.SomeOtherFieldForPhone1, t3.someOtherFieldForPhone2
  FROM Table1 t1
  INNER JOIN Table2 t2
     ON t2.PhoneNumber = t1.PhoneNumber1
  INNER JOIN Table2 t3
     ON t3.PhoneNumber = t1.PhoneNumber2
  </code></pre>
  
  <p>This seems to work.</p>
  
  <p><strong>Method 2</strong>:</p>
  
  <p>To somehow have a query that looks a bit like this -</p>
  
  <pre><code>SELECT ...
  FROM Table1
  INNER JOIN Table2 
     ON Table1.PhoneNumber1 = Table2.PhoneNumber OR
        Table1.PhoneNumber2 = Table2.PhoneNumber
  </code></pre>
  
  <p>I haven't gotten this to work yet and I'm not sure if there's a way to do it.</p>
  
  <p>What's the best way to accomplish this? Neither way seems simple or intuitive... Is there a more straightforward way to do this? How is this requirement generally implemented?</p>