For Finding the duplicate values in a SQL Server Table Column

SELECT id, COUNT(id) FROM table1 GROUP BY id HAVING COUNT(id)>1;

 

id–>  table column name

Add Comment