How to delete duplicate records from a table?(for suppose in
a table we have 1000 Records in that we have 200 duplicate
Records , so ,how to findout that duplicate Records , how to
delete those Records and arranged into sequence order? one
more thing that there is no primary key at all)

Answer Posted / cp

DELETE FROM emp WHERE ROWID NOT IN(SELECT MAX(ROWID) FROM
emp GROUP BY empno)

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the drawbacks of reporting in ssrs?

108


What is join and name different type of joins?

584


How do you check sql server is up and running?

514


What are Row versions of DataRow?

606


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

580






How to recompile stored procedure at run time?

569


How to insert multiple rows with a subquery?

532


What is optimization and its types?

536


What is difference between equi join and inner join?

484


Define model database?

575


Explain full-text indexing?

516


In what sequence sql statement is processed?

585


Is it ok to shrink transaction log?

519


What is a field name?

515


You want to use a perspective in an mdx query. How do you select the perspective?

157