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...

how to delete duplicate rows in sql server2005

Answer Posted / enis ertem

with DeleteDups as
(
Select * from TableA AS T1
where KeyCol <
(Select Max(Keycol) from TableA as T2
where t1.Id = T2.ID)
)

Delete from Delete Dups;

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When we should use and scope of @@identity?

1038


What is optimization and its types?

1035


What is table join?

1166


What is clustered vs nonclustered index?

997


What is the difference between a local and a global temporary table?

1169


If no size is defined while creating the database, what size will the database have?

1032


How raid can influence database performance?

1082


When is update_statistics command used?

1085


What is #temp and @table variable in SQL server?

1135


How you can change the database name in SQL SERVER?

1245


What are difference between Cluster index and Non-Cluster index?

1125


What are the steps to insert a table?

989


What are system databases in ms sql server?

1116


What do you think of this implementation? Can this be implemented better?

993


What is the difference between grant and with grant while giving permissions to the user?

1021