> The obvious answer would be, have a primary key on FirstName +
> LastName to avoid duplicates in the first place.

Indeed.  Or atleast a unique compound index.


> Second answer, SELECT COUNT(*) FROM table WHERE FirstName = ? AND 
> LastName = ?

And to see all duplicates:

select firstname, lastname, count(*) from table group by firstname, 
lastname having count(*) > 1;

Rob

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
plug@lists.linux.org.ph (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to