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 is cursors?
what are database files and filegroups? : Sql server database administration
How many cores do I need for sql server 2016?
What is the difference between the application object and session object?
Difference between drill down and drill through report.
What is the difference between for xml raw and for xml auto?
What command would you use to create an index?
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 are the encryption mechanisms in sql server?
What is difference between equi join and natural join?
how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration
What is microsoft sql server?
What is transact-sql ddl trigger?
What protocol does sql server use?
how do you test proper tcp/ip configuration windows machine? : Sql server database administration