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
What is a view in sql?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What is the difference between varchar and varchar(max) datatypes?
What is difference between cte and view?
Explain the difference between function and stored procedure?
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
How to manipulate data from one table to another table ?
How does clustered and non clustered index work?
How will you hide an attribute? : sql server analysis services, ssas
Explain how does the report manager work in ssrs?
What is the meaning of sql server?
What is the sql case statement used for?
how to determine the service pack currently installed on sql server? : Sql server database administration
Explain the collation?
What is attribute? : sql server analysis services, ssas