how to delete duplicate rows from table in sql server

Answer Posted / suresh s

delete tblname where columname in (select columnname
FROM tblname GROUP BY columnname having count(columnname)
>=2)

Is This Answer Correct ?    25 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between count and distinct count?

466


What are the features of Embedded SQL

676


Can two different columns be merged into single column? Show practically?

612


What is the contrast amongst drop and truncate?

562


Which is the latest version of sql server and when it is released?

550






What are different type of Collation Sensitivity?

556


What is 5nf in normalization form?

575


Differentiate between delete and truncate.

579


Do you know what is normalization of database? What are its benefits?

562


What are the different sql server versions?

521


Which data type columns are the best candidates for full-text indexing?

603


What are the components of dbms?

533


What are the different types of Indexes available in SQL Server?

521


What is the command dbcc checkdb used for?

536


Can we do dml on views?

555