SELECT entryid, Count(entryid) AS ecount
GROUP BY entryid
HAVING (Count(entryid) > 1) -- This runs after the aggregate count() function
Tuesday, June 9, 2009
Find Duplicate IDs in a Table with SQL
This is a simple way to find all the rows that have duplicate IDs / values in a table.