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
How to check last update on table in db2?
What is the purpose of rollback and commit?
What is db2 catalog database?
What does reorg do in db2?
What is the difference between spufi and qmf?
What is plan in cobol db2?
What is runstats utility in db2?
How to check sequence on a table in db2?
How to fetch the last row from the table in SQL (db2)?
What is difference between alias and synonym in db2?
What is the difference between db2 and oracle?
How to create backup table in db2?
What is scrollable cursor in db2?
Why do we use cursor?
Before you give the explain statement, what are the prerogatives?