How can I delete duplicate records?

Q: I HAVE A TABLE THAT CONTAINS 10 RECORDS in it…and now by mistake, for some reason the same record(s) are being insterted with two duplicates, so that I see 30 records in this table. How can I delete these duplicates without losing my original 10 records? Can you write a query that does this?

Bryan Oliver says: Not that easy. You need to have at least a unique key in the table to remove the record as SQL Server will not allow a deletion to affect multiple rows when there is no unique key.

Take a look at this article.

http://www.sql-server-performance.com/dv_delete_duplicates.asp