PDA

View Full Version : show all double records


esthera
06-06-2005, 02:07 PM
I have a table in a db

I want to do a query to either
1. pull out all unique names

2 and preferable -- show me which names are in the table more then once.

can someone help me??

Kid Charming
06-06-2005, 05:39 PM
This should work:


SELECT
name
,COUNT(name) AS namecount
FROM
table
GROUP BY
name
HAVING
namecount > 1