How to delete duplicate records from a table?(for suppose in
a table we have 1000 Records in that we have 200 duplicate
Records , so ,how to findout that duplicate Records , how to
delete those Records and arranged into sequence order? one
more thing that there is no primary key at all)

Answer Posted / sirisha

with numbered as(select rowno = row_number() over(partition
by empid order by empid),empname from employee)delete from
numbered where rowno > 1

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to verify a user name with sqlcmd tool?

587


What is the server name for sql management studio?

479


What is difference between sql and sql server?

546


You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?

110


Mention the different types of triggers?

553






To which devices can a backup be created and where should these devices be located? : sql server management studio

571


What is a join in sql? What are the types of joins?

525


How to drop an existing table?

555


How to enable/disable indexes?

601


What is identity?

559


List the advantages of using stored procedures?

563


What are a scheduled jobs or what is a scheduled tasks?

496


How efficient you are in oracle and SQL server?

644


How to loop through the result set with @@fetch_status?

671


How to perform key word search in tables?

536