> I am trying to get rid of duplicate user info entries in a database.  I
> am assuming that the email address is unique but other information, like
> first name, last name, address, etc are not.  The "email" field is not a
> unique field in the database.  I was trying something like the
> following, but not getting what I wanted.

> select distinct u1.id,u1.firstname,u1.lastname,u1.email from Users u1,
> Users u2 where u1.email=u2.email;

i *think* something like this should work
-> select id,firstname,lastname,email from Users group by email having
count(*)>1;

group and having are the keys, if/when that does not work.

HTH
Jeff

> How can I go about identifying the duplicate entries of email addresses?

> Thank you,
> Jonathan Duncan

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]







-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to