Skip to content

Instantly share code, notes, and snippets.

@hlashbrooke
Created July 12, 2013 11:14
Show Gist options
  • Save hlashbrooke/5983678 to your computer and use it in GitHub Desktop.
Save hlashbrooke/5983678 to your computer and use it in GitHub Desktop.
Find duplicate field values in MySQL
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