I’ve been asked several times over the last few days to help people find duplicates within a particular table, and below is a very basic bit of SQL which will do exactly that:
SELECT Column1, COUNT(Column1) [Data Count] FROM Table GROUP BY Column1 HAVING COUNT(Column1) > 1
Fairly straight forward, every where that I’ve written “Column1”, put the name of the column that you’d like to check for duplicates. You’ll obviously also need to replace “table” with the name of your table.
The “HAVING” clause just makes sure that only records with more than 1 record are returned, this can be modified as you please, or removed completely.