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 Dependency Injection and provide example?
What do you understand by mirroring?
What is the difference between truncate and delete commands?
What is sql server english query?
What is a sql join?
What are the purposes of floor and sign functions?
What is the use of set nocount on/off statement?
Write SQL queries on Self Join and Inner Join.
What do you mean by a Composite primary key?
Explain what are the database objects? : SQL Server Architecture
How the authentication mode can be changed?
What is a document index?
How to create a Master database in SQL server ?
What is the parse query button used for?
What is scd (slowly changing dimension)? : sql server analysis services, ssas