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...

Write a query to delete duplicate records in SQL SERVER

Answer Posted / saurabh dixit

DECLARE @people TABLE
(
name VARCHAR(32),
age INT
)
insert into @people
select Name,age From People group by Name,Age having COUNT(name)>1

delete People from People pe
join @people p on pe.name=p.name and pe.age=p.age

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I schedule a sql server profiler trace?

968


What is tabulation?

942


How much is a sql server license?

941


Where are stored procedures in sql server?

1057


why would you call update statistics? : Sql server database administration

1073


Can You Use A Stored Procedure To Provide Data To An Ssrs Report?

143


What is read committed?

1072


What is the purpose of grouping data in a report?

954


How to connect Azure federated root database and apply federation in entity framework?

107


How to retrieve error messages using odbc_errormsg()?

1042


How to Check if table exists in sql server?

1118


How do I port a number to sql server?

1029


Difference between aggregate functions of sql?

1090


how can you attach more than 20 ldf files in sql server

1990


How can change procedure in sql server?

1049