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

How to change server name in sql server?

1100


what are the different stages of Report Processing?

125


What is the difference between the 2 operating modes of database mirroring?

1059


Define right outer join?

932


How to use "begin ... End" statement structures in ms sql server?

960


What do you understand by replication in sql server?

997


What is resource governor in sql server?

949


How to create a large table with random data for index testing in ms sql server?

981


What is difference between line feed ( ) and carriage return ( )?

855


How to create a new schema in a database?

1075


What is replace and stuff function in sql server?

999


Explain the third normal form(3nf)?

896


Explain tablesample?

948


Why truncate is ddl command?

995


Explain features and concepts of analysis services?

933