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 / vineet dhamija

the best approach i came across in simple form too
just create a temporary table with the distinct values and
truncate this table than copy the values back and u r good to go
select distinct * into #temp from urtable
truncate table urtable
insert into urtable select * from #temp
drop table #temp

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a raid and what are different types of raid configurations?

1261


Show Practically Sql Server Views are updatable?

1112


What is the return type of executeupdate ()?

898


Who developed sql server?

927


What is difference between index and primary key?

1096


Do you know how to make remote connection in database?

955


What is a cursor, index in sql?

1066


What do you understand by triggers?

916


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

1270


How raid can influence database performance?

1020


What is cube dimension? : sql server analysis services, ssas

998


What is rs.exe utility?

156


What does dml stand for?

942


Where actually sql azure database is hosted?

163


How to truncate the log in sql server 2012? : sql server database administration

1277