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
How to delete an existing row with delete statements in ms sql server?
What is extended stored procedures?
What is the difference between clustered index and primary key?
What is stored procedures?
What are the difference between primary keys and foreign keys?
How to execute a stored procedure in ms sql server?
List some advantages and disadvantages of stored procedure?
Explain tablesample?
List the different types of joins?
Difference between uniqe index and uniqe constraint?
Explain nested join?
Can we perform backup restore operation on tempdb? : sql server database administration
What are the 3 types of schema?
How are the unique and primary key constraints different?
What are page splits?