Hi friends,
I want to know,what is the query to delete the duplicate rows from the table?
SQL Server query
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 13, 2011, 3:15 AM EST
STEP 1 - Insert your distinct data into a temporary table select distinct* into temp from TableName
STEP 2 - Delete From TableName
STEP 3 - Insert TableName Select * From temp
Thanks
Hemant KumarRank #1,202 · 1.5K reputationPosted Nov 13, 2011, 2:27 AM EST
http://blog.sqlauthority.com/2007/03/01/sql-server-delete-duplicate-records-rows/
Deepak DwijRank #348 · 7.2K reputationPosted Nov 15, 2011, 1:48 PM EST