This is a quick code scrap to illustrate how to identify duplicate field values in record sets in MySQL.
The code may also work for other SQL languages, but do check your version of SQL if you have any issues.
SELECT myfield, COUNT(*) count FROM `tablename` GROUP BY myfield HAVING count > 1
In this query, “tablename” is checked to see how many times “myfield” is repeated more than once.