title: How to handle One-to-Many Join without repeat rows
body: <p>In MS SQL Server I have two tables [Products] and [Product_img] with relationship (ONE TO MANY).</p>
  
  <p>SELECT p_id, name FROM dbo.products</p>
  
  <p>| 15 |  | name1 |</p>
  
  <p>| 17 |  | name2 |</p>
  
  <p>SELECT p_id, path FROM dbo.product_img</p>
  
  <p>| 1.jpg |   | 15 |</p>
  
  <p>| 2.jpg |   | 15 |</p>
  
  <p>| 3.jpg|    | 17 |</p>
  
  <p>| 4.jpg |   | 17 |</p>
  
  <p>SELECT dbo.product_img.p_id, dbo.products.name, dbo.product_img.path FROM dbo.product_img INNER JOIN dbo.products ON dbo.product_img.p_id = dbo.products.p_id</p>
  
  <p>| 15 |  | name1 |   | 1.jpg |</p>
  
  <p>| 15 |  | name1 |   | 2.jpg |</p>
  
  <p>| 17 |  | name2 |   | 3.jpg |</p>
  
  <p>| 17 |  | name2 |   | 4.jpg |</p>
  
  <p>What is the SQL statement that can show the tables like this (with out repeating)?</p>
  
  <p>| 15 |  | name1 |   | 1.jpg |   | 2.jpg |</p>
  
  <p>| 17 |  | name2 |   | 3.jpg |   | 4.jpg |</p>