Created
May 4, 2016 17:35
-
-
Save AlexanderMike/578c95cbd2f39d00fd7f7a83f157cb99 to your computer and use it in GitHub Desktop.
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
| Here's a handy query for finding duplicates in a table. Suppose you want to find all email addresses in a table that exist more than once: | |
| http://www.petefreitag.com/item/169.cfm | |
| 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