Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What happens if you are trying to access a schema not owned by you?

1020


How do you debug a procedure in sql server?

995


How to stop a loop early with break statements in ms sql server?

1073


What is executereader?

1003


How do I make a resultset scrollable?

1012


Is port 1433 secure?

1038


What is the contrast amongst drop and truncate?

1078


Which are the important points to note when multilanguage data is stored in a table?

1067


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

1009


What is set nocount on and what is set nocount off?

993


Give main differences between "Truncate" and "Delete".

1150


Is it true, that there is no difference between a rule and a check constraint?

1110


What happens if null values are involved in datetime operations?

1021


What is the difference between Stored Procedures and triggers?

1133


how we use window authentication connection with sql server.?

1211