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

How can i Relate Tables in SSIS

573


Can we use having clause without group by?

549


what is datawarehouse?

644


What is use of attributehierarchyenabled? : sql server analysis services, ssas

603


What is the name of the Database which IBM mainframe uses?

536






what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

1570


What is collation?

713


How to delete an existing row with delete statements in ms sql server?

546


How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

578


How can we delete Duplicate row in table?

629


Which is better statement or preparedstatement?

518


Explain boyce and codd normal form(bcnf)?

530


How to turn off warning messages during php execution?

524


Difference between drill down and drill through report.

542


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

666