Tuesday, May 5, 2015

Count duplicate rows or records in Sql server

Introduction: In this article today I am going to explain how to count all duplicate rows/records in the table in Sql server


To count the duplicate records of each below run the below given query:

Select SudentName,Fee,StudentClass,StudentRollNo, count(*) as Duplicate from dbo.Student_Detail group by SudentName,Fee,StudentClass,StudentRollNo having count(*) >1

No comments:

Post a Comment