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
Explain transaction server consistency?
What is the maximum size of sql server database?
Explain partitioned view?
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
What is the command used to check locks in microsoft sql server?
can we have a nested transaction? : Sql server database administration
What are the main differences between #temp tables and @table variables and which one is preferred?
How can you know if the row fetched from cursor is still valid in underlying table?
What is the purpose of data source?
Is ssrs support other database except ms sql server?
What is data file in computer?
Define candidate key, alternate key, and composite key.
What is change data capture (cdc) feature?
How to enter date and time literals in ms sql server?
What is self contained scalar sub query?