Created
March 18, 2015 17:26
-
-
Save L3V147H4N/58cc98a54b6082124744 to your computer and use it in GitHub Desktop.
SQL - Find Duplicates By Given Field
This file contains hidden or 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 Table | |
WHERE Table.Field IN ( | |
SELECT Table.Field | |
FROM Table | |
GROUP BY Table.Field | |
HAVING COUNT(*) > 1 | |
) | |
ORDER BY Table.Field | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment