title: Join two tables to get matching records and unmatched records from Table 1
body: <p>Scenario: I have 2 tables namely Coverage and Product</p>
  
  <p><strong>Coverage Table:</strong>
  CId,CName,CType,CMessage,CDate,CoverageProductId</p>
  
  <p><strong>Product Table:</strong>
  PId,CName,CType,CMessage,PDate,CoverageProductId</p>
  
  <p>By using CoverageProductId i am relating 2 tables.</p>
  
  <p>I need to get 3 columns CName,CMessage and CoverageProductId from both tables </p>
  
  <p>Condition Below,</p>
  
  <ul>
  <li>Get 3 columns values from Product table if both table CoverageProductId matches.</li>
  <li>Get 3 columns values from Coverage table if both table CoverageProductId not matches.</li>
  </ul>
  
  <p>My query is below in MS sql server</p>
  
  <pre><code>SELECT Distinct C.CoverageProductID
  ,C.CName
  ,C.CType
  FROM Coverage C
  INNER JOIN Product P
  ON C.CoverageProductID!=P.CoverageProductID
  UNION
  SELECT Distinct P.CoverageProductID
  ,P.CName
  ,P.CType
  FROM Coverage C
  INNER JOIN Product P
  ON C.CoverageProductID=P.CoverageProductID
  </code></pre>
  
  <p>But the result is not as expected and it returns duplicate values.</p>