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

what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5583


What is the contrast between sql and mysql?

688


Explain what are commit and rollback in sql?

600


What does REVERT do in SQL Server 2005?

624


Do you know the capabilities of cursors?

624






What is for xml in sql server?

610


What happens if we shrink log file in sql server?

599


How to use subqueries in the from clause in ms sql server?

664


How will you find out if there are expensive SQL statements running or not?

660


Explain sql server service broker?

612


How does Report Builder support Analysis Services cubes?

120


What is a partition key?

593


Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

570


What is normalization? Explain its different types?

683


What are the differences between having and where clause.

629