Delete Duplicate Rows quickly with a CTE and ROW_NUMBER() in SQL Server 2005 and 2008. A sample table with 7 rows, 3 of them duplicates, shows how it works.
SQL SERVER – UDF – Remove Duplicate Chars From String
A reader, Virendra Chauhan, shared a UDF that removes duplicate chars from one large string. Here is his REMOVE_DUPLICATE_INSTR function and how to call it.
SQL SERVER – Count Duplicate Records – Rows
A simple query to count duplicate records in a table using GROUP BY, HAVING COUNT(*) and ORDER BY, with the most repeated values first. A video is included.
SQL SERVER – Delete Duplicate Records – Rows
A short query to delete duplicate records from a table with an identity column: keep the MAX(ID) in each group of duplicate columns and remove the rest.




