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 from table in sql server

Answer Posted / gerry

delete from my_table where my_primary_key in
(select a.primary_key from my_table a, my_table b
where not a.my_primary_key = b.my_primary_key
and [insert restriction that makes the 2 rows the same]
)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an index in sql?

1006


What is 'Join' and explain its various types.

1138


What is subquery explain with example?

1063


What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration

1017


What is enhanced database mirroring in sql server 2008?

971


How to enable/disable indexes?

1068


How do I create a partition table in sql server?

1125


What is reference section?

1005


How to write a query with a full outer join in ms sql server?

1081


What do you understand by triggers and mention the different types of it?

940


Are resultset updatable?

953


Sql server reporting services vs. Crystal reports.

131


Which database stores information about replication?

1071


How can you insert null values in a column while inserting the data?

1282


What does null mean?

988