How to retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?
Answer Posted / mon
DELETE FROM MyTable
LEFT OUTER JOIN (
SELECT MIN(RowId) as RowId, Col1, Col2, Col3
FROM MyTable
GROUP BY Col1, Col2, Col3
) as KeepRows ON
MyTable.RowId = KeepRows.RowId
WHERE
KeepRows.RowId IS NULL
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between a check constraint and a rule?
What is tablix?
Tell about MOM Tool(Microsoft Operator Manager)?
What is data modification?
What is instead of dml trigger?
What are the acid properties?
what is the difference between Delete and Truncate command in SQL
What is server-level principal?
What is check constraint in sql server?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
What is table valued function and scalar valued functions?
Explain time data type in sal server 2008?
Can one drop a column from a table?
How to override dml statements with triggers?
What is an execution plan?