What is the SQL query to select, delete and get count of
duplicate rows in DB2?
Answer Posted / igor kramov
DELETE FROM (
SELECT ROWNUMBER() OVER (PARTITION BY c1, c2 ORDER BY c3
DESC) AS rnum FROM t1)
WHERE rnum > 1 ;
the same is for Select\Count
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of using commit?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
What is the latest version of ibm db2?
What is the syntax for FETCH in DB2 ?
Explain the contention situations caused by locks?
Where can you declare a cursor in a cobol-db2 program?
What are the full forms of spufi and dclgen and why are they used?
What is null indicator in cobol db2?
is it compulsory commitment control in journal?
What is data manager?
How to execute stored procedures?
How to create db2 table in mainframe?
How can deadlocks be resolved?
Are view updateable?
What is the difference between plan and package in db2?