I know that I can run the following query below to find "duplicate" rows based on multiple columns that do something like this:
SELECT PosId, OrgId
FROM PosOrg
GROUP BY PosId, OrgId
HAVING COUNT(*) > 1
but now I want to remove duplicate rows so that the above query ends with returning zero rows. I donβt care which of the rows I delete (as many as only one row will remain based on the uniqueness of these two columns.
What is the correct way to remove these duplicates in SQL?
leora source
share