Delete duplicate records from the table?(Table must have
unique id)

Answer Posted / dinesh kumar

delete from emp where id Not in(select max(id) id from emp
group by name having count(id)>1)

Is This Answer Correct ?    22 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you delete duplicate records in sql server?

723


What is subreport?

112


What is difference between join and natural join?

643


define and explain the differences between clustered and non-clustered indexes.

818


How to deploy the Report?

107






What is the boxing and unboxing concept in .net?

706


How to connect of datebase with sql express.?

812


Explain indexing and what are the advantages of it?

709


Explain having clause and where clause?

783


What new changes are being made in SQL Server?

775


How to create a scrollable cursor with the scroll option?

667


What is the template in sql?

725


How to see existing views in ms sql server?

715


What is optimistic concurrency?

740


What does truncate do?

698