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
Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you
What is the new security features added in sql server 2014? : sql server security
What does REVERT do in SQL Server 2005?
What do you mean by SQL injection attack?
What samples and sample databases are provided by microsoft?
What method is used by the Command classes to execute SQL statements that return single values?
What is SQL Server?
What are the 3 types of schema?
Write a code to select distinct records without using the DISTINCT keyword.
How do I find the port number for sql server?
How can I tell if sql server is 32 or 64 bit?
What is amo? : sql server analysis services, ssas
What is partition index in sql server?
How to filter out duplications in the returning rows in ms sql server?
Is there any difference between primary key and unique with the not null condition?