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

It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

1044


Working with TLogs

1837


How to replace the Query Result 'Null Value' with a text ?

1045


How to get @@error and @@rowcount at the same time?

1035


Can we write trigger for view?

1016


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

1031


What are indexes in ms sql server?

1064


How to find out the list schema name and table name for the database?

942


How to loop through result set objects using mssql_fetch_array()?

1084


How do you rename a table in sql server?

1032


What is 2nf in normalization?

1002


How to transfer data from a cursor to variables with a "fetch" statement?

1099


1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.

1594


Where actually sql azure database is hosted?

163


Tell me what do you understand by a view? What does the with check option clause for a view do?

1021