Created
May 31, 2017 07:21
-
-
Save amitmerchant1990/d570d98715508f412753253fbced8e24 to your computer and use it in GitHub Desktop.
Quickly find duplicate records based on any field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM 2009_product_catalog | |
WHERE sku IN ( | |
SELECT sku | |
FROM 2009_product_catalog | |
GROUP BY sku | |
HAVING count(sku) > 1 | |
) | |
ORDER BY sku |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment