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
what is the system function to get current user's user id? : Sql server database administration
How do you clear a log file?
Explain different types of self contained sub query?
What is use of except clause?
Can a database be shrunk with users active?
What is the difference between char and varchar2 datatype in sql?
is there a column to which a default can't be bound? : Sql server database administration
How will you make an attribute not process? : sql server analysis services, ssas
What is the use of tempdb? What values does it hold?
What type of locking occurs during the snapshot generation? : sql server replication
How do I run sql server 2014?
What is 4nf in normalization form?
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
What do you mean by a dependent functionality in a build?
How to create percentile function?