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

Do you think BCNF is better than 2NF & 3NF? Why?

1278


How to create “dependant” parameter “make, model, year”

131


What is sql sandbox in sql server?

1222


What are the differences between clustered and non-clustered index?

1031


What are the types of containers in ssis?

1171


Explain what is cte (common table expression)?

1131


How do I start and stop sql server?

1020


What is use of except clause? How does it differ from not in clause?

1020


How to provide default values to function parameters?

1135


Explain about builtinadministrator?

1053


How to install sql server 2005 express edition?

1122


Why do we partition data?

1028


how you can deploy an ssrs report?

178


How to create and drop temp table in sql server?

1051


What is the use of tempdb? What values does it hold?

1072