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

What is spid in sql server profiler?

1025


Explain datetimeoffset data type in sal server 2008?

848


What are the different types of backups that exist?

1108


Which Model uses the SET concept

932


How to find the version of sql server? : sql server database administration

1044


What is logon trigger?

1027


Do you know what is sql injection?

935


Differentiate between SQL and ORACLE joins and write their syntax.

975


What is unique key constraint?

987


Explain indexed views?

924


What are sql dirty pages?

968


How much is a sql server license?

899


Explain the steps needed to create a scheduled job?

881


Explain activity monitors

1000


What are system databases into sql server (2005/2008) : sql server database administration

963