How To Check Duplicate data in sql

Hiiiiiiiiiiiiiiiiiii


How To Check Duplcate Data in Sql Server

 
Here is a simple query to check for the duplicacy of data

Suppose there is a table names Student

There is a column 'ID'

Query:


Select id,Count(*) from Student groupby id having count(*) >1

Result:

The Above query will display the records of all the students having same id

Thanks
MCTS Rajshree Mittal
Sofware Developer
Ebook Download
View all
Learn
View all