How To delete duplicate record from a particular table?

Answer Posted / srinivasan

WITH CTE AS
(
SELECT * ,ROW_NUMBER() OVER (PARTITION BY ID,NAME
ORDER BY ID DESC) AS RNUM FROM TABLE A
)

DELETE CTE WHERE RNUM >1

IF U HAVE ANY MORE DOUBTS
MAIL ME MCAVASAN@GMAIL.COM

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

740


How do you clear a log file?

709


Explain different types of self contained sub query?

729


What is use of except clause?

823


Can a database be shrunk with users active?

796






What is the difference between char and varchar2 datatype in sql?

742


is there a column to which a default can't be bound? : Sql server database administration

729


How will you make an attribute not process? : sql server analysis services, ssas

753


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

742


What type of locking occurs during the snapshot generation? : sql server replication

1082


How do I run sql server 2014?

694


What is 4nf in normalization form?

754


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

719


What do you mean by a dependent functionality in a build?

828


How to create percentile function?

124