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
Explain the benefits you can get from mainframe connect?
What kind of database is db2?
How do we specify index to include or not during bind process.
How do I delete a table in db2?
Which isolation level provides highest data integrity?
Describe major components of db2?
What is bufferpool in db2?
What is db2?
Define declaration generator (dclgen).
What does db2 blu stand for?
What is cobol db2?
What is db2 stogroup?
How to connect to db2 database from windows command line?
What is page size in db2?
What is runstats utility in db2?