how to delete duplicate rows in sql server2005

Answer Posted / surendra pal singh

delete from tablename where empname in (select empname from table name group by empname having empid>1)

where empname and empid are the columns of the table.
definately it will work

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does group by or order by come first?

546


What is the contrast between sql and pl/sql?

626


How to access the inserted record of an event?

576


List out different types of normalizations in sql server and explain each of them?

559


What is the maximum number of index per table?

568






What is the use of builtinadministrators group in sql server? : sql server security

537


What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

478


What are the difference between data mart and data warehouse? : sql server analysis services, ssas

506


Data table as parameter in sql server?

569


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

541


What are the dmvs?

575


Explain can SSRS reports Cache results?

112


Describe how to use linked server?

547


what is a transaction? : Sql server database administration

473


Explain transaction server distributed transaction?

504