DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Arthur has posted 13 posts at DZone. View Full User Profile

SQL: Check For Duplicate Rows

07.19.2007
| 9818 views |
  • submit to reddit
        
SELECT email,
COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )