title: Return matching rows only SQL Server
body: <p>I am sure this simple but i am really stuck. Here is a example of the resultset i want from two tables that have the same structure and in this case data or  records</p>
  
  <p>TableA</p>
  
  <pre><code> Ref  cola  colb id
   ------------------
   1     a      b   14
   1     a      b   24
  </code></pre>
  
  <p>TableB</p>
  
  <pre><code>Ref  cola  colb id
  ------------------
   1     a      b  1
   1     a      b  2
   1     a      b  3
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>Ref  cola  colb id Ref1  cola1 colb1 id1
  ----------------------------------------
  1      a     b   14  1      a      b   1
  1      a     b   24  1      a      b   2
  </code></pre>