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
Explain throw statement in sql server 2008?
What is scd (slowly changing dimension)? : sql server analysis services, ssas
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
How does clustered and non clustered index work?
What is molap and its advantage? : sql server analysis services, ssas
Explain syntax for dropping triggers?
How to get all stored procedures in sql server?
How data can be copied from one table to another table?
What is identity?
What are the types of table?
what's sql server? : Sql server database administration
What is ms sql server index?
What is the report builder?
What is a fan-out query in SQL Azure?
How to generate random numbers with the rand() function in ms sql server?