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 retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / gaurav jain

begin
select distinct * into #one from four where id in (select
id from four group by id
having count(*)>1)
delete from four where id in (select id from four group by
id having count(*)>1)
insert into four select * from #one
end

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are constraints? Explain different types of constraints? : Sql server database administration

974


What is the process of indexing?

1005


Write the syntax for stuff function in an sql server?

1021


Why do you want to join software field as you have done your BE in Electronics?

2137


How to create a dynamic cursor with the dynamic option?

1040


Can we add our custom code in ssis?

979


what are the disadvantages of cursors? : Sql server database administration

1027


What is tempdb in sql server?

967


What is bookmark link in ssrs?

244


how would you troubleshoot blocking? : Sql server database administration

975


What are subqueries in sql server?

1116


Explain the properties of sub-query in sql server?

1001


What is proper subset of candidate key?

990


How do I know if localdb is running?

941


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1157