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
How to insert multiple rows with one insert statement in ms sql server?
Is it possible for a stored procedure to call itself or recursive stored procedure?
Can sql servers linked to other servers like oracle?
Do you know the policy based administration feature of sql server 2008?
Why I have to use stored procedures?
What is indexed view?
What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
Is null vs coalesce?
What are various ways to enhance the ssrs report?
Describe how to use linked server?
Define Unique Key?
Explain what are the events recorded in a transaction log?
What are filegroups in sql server?
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.