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 / anuj dhingra

DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2,
DuplicateColumn2)

Is This Answer Correct ?    12 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is store procedure? When do you use?

923


Can foreign key be deleted?

917


How can we delete Duplicate row in table?

1050


What are system databases into sql server (2005/2008)?

991


Explain the different types of joins?

985


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that

2204


Where the sql logs gets stored?

977


Can we update data in a view?

1021


How can delete duplicate records in cte in sql server?

961


How to call a function from a stored procedure in SQL Server ?

1016


How do I open a .db file?

1029


what is a correlated sub-query? : Sql server database administration

934


What is the report builder?

139


How is foreign key related to primary key?

964


how to invoke a trigger on demand? : Sql server database administration

1071