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

Explain how dts is used to extract, transform and consolidate data?

590


What are the operating modes in which database mirroring runs?

618


what types of replication are supported in sql server? : Sql server database administration

477


Can you please differentiate between a primary key and a unique key?

546


what are the critical issues you have resloved in your company

1559






Why do you need a sql server?

514


Explain how to maintain a fill factor in existing indexes?

538


Why use cursor in sql server?

560


Explain what are partitioned views and distributed partitioned views?

588


How to compare the top two records using sql?

772


How to write character string constants or literals in ms sql server?

552


What is the difference between executequery () and executeupdate ()?

531


What is sql language?

559


How to link tables in sql server?

483


What is ddl command?

540