Created
July 12, 2013 11:14
-
-
Save hlashbrooke/5983678 to your computer and use it in GitHub Desktop.
Find duplicate field values in MySQL
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 email_address, COUNT(email_address) AS occurrences | |
FROM users | |
GROUP BY email_address | |
HAVING occurrences > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment