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
let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration
Explain what is meant by replication of database?
What happens if null values are involved in comparison operations?
How to create new tables with "create table" statements in ms sql server?
Explain what are page splits? : SQL Server Architecture
Is oracle faster than sql server?
What is difference between index seek vs. Index scan?
What is a DBMS, query, SQL?
What happens if date-only values are provided as date and time literals?
What is the difference between the 2 operating modes of database mirroring?
What is “asynchronous” communication in sql server service broker?
What is single-user mode?
What is inline table-value user-defined function?
A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?
Can you please differentiate between a primary key and a unique key?