how to delete duplicate rows from table in sql server

Answers were Sorted based on User's Feedback



how to delete duplicate rows from table in sql server..

Answer / 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

how to delete duplicate rows from table in sql server..

Answer / swapna

We can delete duplicate rows from table by using distinct
command.

Is This Answer Correct ?    10 Yes 35 No

Post New Answer

More SQL Server Interview Questions

What is a hint?

0 Answers  


what stored procedure would you use to view lock information? : Sql server administration

0 Answers  


What is store procedure? When do you use?

0 Answers  


Where do you think the users names and passwords will be stored in sql server?

4 Answers   BirlaSoft,


How can we delete a table in sql server?

0 Answers  






What do you mean by a Composite primary key?

0 Answers   Genpact,


Tell me what is the stuff and how does it differ from the replace function?

0 Answers  


write coding for importing sql data into a word excel...

1 Answers   Oracle,


Do you know what is similarity and difference between truncate and delete in sql?

0 Answers  


How will you know when statistics on a table are obsolete?

0 Answers  


Explain few examples of stored procedure over triggers?

0 Answers   ADITI,


How to disable triggers using "disable trigger"?

0 Answers  


Categories