title: Querying a table with a composite primary key
body: <p>I have a table with composite primary keys. This is a cross reference table and looks like this</p>
  
  <pre><code>Table 
  ID    Relationship             ID2
  1     Spouse                   10
  2     Employee                 20
  2     Former Employee          20
  3     Former Employee          30
  4     Child                    40
  </code></pre>
  
  <p>I am trying to write a query where ID2 matches, you have both employee and former employee for same ID</p>
  
  <pre><code>ID    Relationship             ID2
  2     Employee                 20
  2     Former Employee          20      
  </code></pre>
  
  <p>Appreciate any help!!</p>