title: In SQL, how can I delete duplicate rows based on multiple columns?
body: <p>I know I can run the following query below to find "duplicate" rows based on multiple columns doing something like this:</p>
  
  <pre><code>SELECT      PosId, OrgId
  FROM        PosOrg
  GROUP BY    PosId, OrgId
  HAVING COUNT(*) &gt; 1
  </code></pre>
  
  <p>but now I want to delete the duplicate rows so the above query ends of returning zero rows.  I don't care which of the rows that I delete (just as long as only one rows remains based on the uniqueness of those two columns.</p>
  
  <p>What is the correct way to delete these duplicates in SQL?</p>