Thursday, February 14, 2013

Script to find Duplicate Values in SQL Server

Find Duplicate Values in SQL Server
SELECT COLUMN_NAME, COUNT(COLUMN_NAME) AS NumOccurrences
FROM  [TABLE_NAME]GROUP

BY COLUMN_NAME
HAVING ( COUNT(COLUMN_NAME) > 1 )