Delete duplicate records from the table?(Table must have
unique id)
Answer Posted / lince
DELETE
FROM MyTable
WHERE ID IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1 HAVING COUNT(ID)>1
)
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
what is a self join? : Sql server database administration
Why use “pivot” in sql server?
What is cross join in sql server joins?
Explain what are various ways to enhance the ssrs report?
How to create a scrollable cursor with the scroll option?
How to defragment table indexes?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
Which are the third-party tools used in sql server and why would you use them?
How to create a view with data from multiple tables?
How to remove duplicate rows from table except one?
What is SQL Azure Federations?
What is unpivot?
OPTIMIZATION OF SP,CURSOR,TRIGGERS
can an automatic recovery be initiated by a user? : Sql server administration
What does asynchronous call backs means?