Write a query to delete duplicate records in SQL SERVER
Answer Posted / anuj dhingra
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2,
DuplicateColumn2)
Is This Answer Correct ? | 12 Yes | 8 No |
Post New Answer View All Answers
Difference between group by clause and having clause in SQL?
How many tables can be joined in SQL Server?
Can we use where clause with group by?
What are different types of roles provided by ssrs?
How do I find query history in sql server?
What is indexing in sql server with example?
Explain Normalization and DE normalization
Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?
What is SQL Azure Data sync?
What is meant by indexing?
What the different types of Replication and why are they used?
How many joins in sql server?
What is report snapshot in ssrs?
What is named query? : sql server analysis services, ssas
How to attach adventureworkslt physical files to the server?