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 the difference between executequery () and executeupdate ()?

1105


What are tables in sql server?

1090


Explain sql delete command?

1089


What is it’s similarity with sql server?

160


How to include text values in sql statements?

1090


Mention what are the core components of ssrs?

328


What are the restrictions while creating batches in sql server?

1108


What is page-level compression?

1006


What are the new features are introduced in sql server 2012 reporting services?

160


How to return the second 5 rows in ms sql server?

1101


How to get a list of columns in a view using "sys.columns" in ms sql server?

1037


How does normalization work?

967


Write SQL queries on Self Join and Inner Join.

1212


Explain about the command-line tool SQLCMD?

1140


Explain trigger and its types?

1112