Write a query to delete duplicate records in SQL SERVER

Answer Posted / chandran

There is a table like this: tablename: example


Name Age
chandran 23
ranjith 24
chandran 23

In this table the name:chandran and age:23 are the
duplicate records .so we need to delete this using this
sql statements


delete from example group by name,age having count>1

Is This Answer Correct ?    37 Yes 107 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you set a trace flag in sql server?

559


Explain can SSRS reports Cache results?

112


What is a livelock?

562


What is difference between order by and group by?

578


What is log ldf?

559






What is an active database?

600


What is the difference between cube operator and rollup operator? : SQL Server Architecture

630


How to implement service broker?

529


What is pessimistic concurrency?

546


What is 'Join' and explain its various types.

630


What is a scheduled job or what is a scheduled task?

541


what exactly sql injuction.how to overcome.....

2043


Write a query to find 5th highest amount paid from the customer table.

538


How do you Implement SSIS Packages in your Project?

1513


How do I view views in sql server?

522