Write a query to delete duplicate records in SQL SERVER
Answer Posted / skumar
Hi friends, please just try out this. This works fine for me.
We have lot of methods to do this. But using temp table,
drop the original table,retain the temp as orinial is not a
good pratice.
When u have large no of data it will affect ur performance.
DELETE FROM employee WHERE((SELECT eid,COUNT(eid) FROM
employee GROUP BY eid) > 1)
| Is This Answer Correct ? | 15 Yes | 46 No |
Post New Answer View All Answers
What happens if you are trying to access a schema not owned by you?
How do you debug a procedure in sql server?
How to stop a loop early with break statements in ms sql server?
What is executereader?
How do I make a resultset scrollable?
Is port 1433 secure?
What is the contrast amongst drop and truncate?
Which are the important points to note when multilanguage data is stored in a table?
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas
What is set nocount on and what is set nocount off?
Give main differences between "Truncate" and "Delete".
Is it true, that there is no difference between a rule and a check constraint?
What happens if null values are involved in datetime operations?
What is the difference between Stored Procedures and triggers?
how we use window authentication connection with sql server.?