Count Duplicate Records from Table in SQL Server

To delete all the duplicate records in one query. In this example we will see how to find count of all the duplicate records in the table. In this query we also show you the usage of GROUP BY, HAVING, ORDER BY in one query. This Query will returns the results with duplicate column and its record count 

SELECT email, COUNT(*) Count FROM tblCustomers GROUP BY email HAVING COUNT(*) > 1 ORDER BY COUNT(*) DESC

Related Alrticles

Add Your Business in Free Listing


FREE!!! Registration