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
What do you understand by recursive stored procedures?
What is normalization 1nf 2nf 3nf?
How to create a login account in ms sql server to access the database engine using "create login" statements?
What is a performance monitor?
Explain filtered indexes benefits?
Should you normalize audio?
What is a hint?
What are the types of subquery?
Explain the types of indexes.
How many triggers are possible per table?
List out the differences between global and local temp tables in sql server?
What is the purpose of indexing?
How we create SQL Server 2005 Reporting Services ? Give me Sample
what is bit datatype? : Sql server database administration
Write a SQL queries on Self Join and Inner Join.