Skip navigation links

MySQL Forums


Advanced Search

Re: Duplicate records - Show records that has same FIRSTNAME & LASTNAME
Posted by: Peter Brawley ()
Date: March 08, 2008 09:40AM

A simple way to find dupes is

SELECT lastname,firstname,COUNT(*) AS Count
FROM users
GROUP BY lastname,firstname
HAVING Count > 1;

A simple way to prevent name dupes is add a unique key(lastname,firstname).

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject Written By Posted
Duplicate records - Show records that has same FIRSTNAME & LASTNAME Roy Haryanto 03/04/2008 09:00PM
Re: Duplicate records - Show records that has same FIRSTNAME & LASTNAME Peter Brawley 03/08/2008 09:40AM


Sorry, you can't reply to this topic. It has been closed.