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

Explain user defined functions?

943


How to change the system date and time from SQL Plus Terminal ?

1151


What are different types of raid configurations? : SQL Server Architecture

1001


Can you name a few encryption mechanisms in sql server?

890


What are the limitations in ssrs on sql server express edition?

175


What is difference between table aliases and column aliases? Do they affect performance?

909


What is the difference between Clustered and Non-Clustered Index?

1010


what stored procedure would you use to view lock information? : Sql server administration

924


How to backup SQL Server Reporting Services ?

137


How to retrieve field values using mssql_result()?

1184


How to add code to the existing article (using improve article)?

1044


What is the difference between function and stored procedure in sql server?

986


What is relationship? What number of sorts of relationship are there?

1062


What is the purpose of floor function?

974


What is the stored procedure?

945