SQL Find Duplicates





2
Date Submitted Fri. Jul. 20th, 2007 7:28 PM
Revision 1 of 1
Scripter ColdKeyboard
Tags Duplicates
Comments 1 comments
Very simple script that you can use to find duplicated rows in SQL or you can use it to count same rows eg. Top 10 posters script or something like that... very usefull
SELECT email,
COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )
 

Sasa Karanovic

Sasa Karanovic
www.MrdniSe.com
www.SasaKaranovic.com

Comments

There are currently no comments for this snippet.

Voting

Votes Down