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

what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration

567


How self join is different from outer join?

605


What stored by the model?

552


Differentiate sql server reporting services vs. Crystal reports?

150


What are the various editions of sql server 2017 that are available in the market?

506






What is the recovery model? List the types of recovery model available in sql server?

488


Can we call future method from trigger?

514


What do you do in data exploration

564


What is difference between drop truncate and delete?

553


How to identify current user in ssrs report?

242


How do you improve the performance of a SQL Azure Database?

115


What is database replication? What are the different types of replication you can set up in sql server?

500


Do you know clustered and non-clustered index?

530


What is nolock hint in sql server 2008

635


What is it unwise to create wide clustered index keys?

585