MySQL answer.
Re: Find duplicate entries in a table?
Another approach is to list all the duplicate entries. We assume the field 'id' is the primary key of the table 'users'
[sql]
SELECT DISTINCT t1.id, t1.email FROM users t1, users t2 WHERE t1.email = t2.email AND t1.id <> t2.id
[/sql]
|