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 causes index fragmentation?
When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?
What the class forname () does?
Can sub report data source be different from that of the parent report?
Name few of the dcl commands in sql?
Can a database be shrunk to 0 bytes, if not, why?
What is the boxing and unboxing concept in .net?
What is mapping schema?
What happens to a statement batch if there is a compilation error?
Is it possible for a stored procedure to call itself or recursive stored procedure?
Explain what is meant by replication of database?
How to recreate an existing index in ms sql server?
Explain full-text query in sql server?
How can I add Reporting Services reports to my application?
What are the new features are introduced in sql server 2012 reporting services?