Engine23
blogBannerImage
By Engine23

Mysql - check for duplicates

Here is an example for checking for duplicate emails

SELECT email, 
 COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )