title: SQL Return datas from the second table based on the data of the first table
body: <p>I have two SQL Server tables that are not linked together (No join) and I want to get the data from the second table based on the data of the first table. In the first table I have this:</p>
  
  <p>Table 1</p>
  
  <pre><code>id  name
  ----------
  4   BOX-A 
  8   PART-D
  </code></pre>
  
  <p>Table 2</p>
  
  <pre><code>id  name
  ------------
  14  BOX-A1
  25  BOX-A2
  38  TOOL-A1
  39  TOOL-A2
  40  PART-D1
  41  PART-D2
  </code></pre>
  
  <p>What I want to do is that for each name found in table 1, I want to return all the matches in the table 2, so at the end I will have something like this: </p>
  
  <pre><code>id  name
  -----------
  14  BOX-A1
  25  BOX-A2
  40  PART-D1
  41  PART-D2
  </code></pre>