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 is spid in sql server profiler?
Explain datetimeoffset data type in sal server 2008?
What are the different types of backups that exist?
Which Model uses the SET concept
How to find the version of sql server? : sql server database administration
What is logon trigger?
Do you know what is sql injection?
Differentiate between SQL and ORACLE joins and write their syntax.
What is unique key constraint?
Explain indexed views?
What are sql dirty pages?
How much is a sql server license?
Explain the steps needed to create a scheduled job?
Explain activity monitors
What are system databases into sql server (2005/2008) : sql server database administration