Write a query to delete duplicate records in SQL SERVER

Answer Posted / kalyan

with [TN ordered by CN] as
(
select row_number() over(partition by CN order by CN) as
rowid,* from TN
)
delete from [TN ordered by CN] where rowid > 1

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you tell if a database object is invalid?

619


Do you know concepts and capabilities of sql server?

584


What is simple indexing method?

577


How to create a simple table to test triggers in ms sql server?

515


what is the system function to get current user's user id? : Sql server database administration

554






Where do you find the default Index fill factor and how to change it?

607


What is molap and its advantage? : sql server analysis services, ssas

552


What is normalization? Explain different forms of normalization?

544


Explain the Ways to improve the performance of a sql azure database?

64


Why use stored procedures in sql server?

557


What is federation member?

94


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

656


Can foreign key be deleted?

532


What is the use of tempdb? What values does it hold?

569


What is the current limitation of the size of SQL Azure DB?

102