Skip to content

Instantly share code, notes, and snippets.

@rezen
Created May 1, 2014 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezen/70bfec2fe02e768863a5 to your computer and use it in GitHub Desktop.
Save rezen/70bfec2fe02e768863a5 to your computer and use it in GitHub Desktop.
mysql find duplicates of column value
SELECT email,
COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment