Created
December 16, 2011 03:06
-
-
Save ctrl-freak/1484246 to your computer and use it in GitHub Desktop.
SELECT Duplicate Fields in MySQL
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 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