Skip to content

Instantly share code, notes, and snippets.

@ctrl-freak
Created December 16, 2011 03:06
Show Gist options
  • Save ctrl-freak/1484246 to your computer and use it in GitHub Desktop.
Save ctrl-freak/1484246 to your computer and use it in GitHub Desktop.
SELECT Duplicate Fields in MySQL
SELECT field, count(field) AS n
FROM table
GROUP BY field
HAVING n > 1
ORDER BY n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment