How can delete duplicate row from table.
How can delete duplicate row from the table through SQL Query in Sql Server ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jun 8, 2012, 12:46 PM
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
Refer
http://blog.sqlauthority.com/2007/03/01/sql-server-delete-duplicate-records-rows/
Thanks