title: Inner Join Creates Duplicate Records
body: <p>Why does this inner join create duplicates?</p>
  
  <pre><code>SELECT 
      AU.sProdCode, AU.sProdName
  FROM 
      AllowedUsers AU
  INNER JOIN 
      ProdMaster PM ON AU.sProdCode = PM.sProdCode
  WHERE
      PM.sProdStatus = 'pending' AND
      AU.sUserCode = 'TM001'
  </code></pre>
  
  <p>How to get rid of the duplicate issue?</p>
  
  <p><strong>ProdMaster</strong>:</p>
  
  <pre><code>sProdCode   sProdName   sProdStatus
  -----------------------------------
  1001        MyProduct   Pending
  </code></pre>
  
  <p><strong>AllowedUsers</strong>:</p>
  
  <pre><code>sProdCode   sProdName   sUserCode
  ----------------------------------
  1001        MyProduct   TM001
  </code></pre>
  
  <p>My condition</p>
  
  <ol>
  <li>If the Product status is Pending (In ProdMaster)</li>
  <li>User is allowed to view the product (In Allowed User - User code)</li>
  <li>Show the product code / Product name without duplicate.</li>
  </ol>