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 sequence on a table in db2?
How and when does the db2 enforces the unique key?
What is schema in db2?
Is db2 relational database?
Explain the function of data manager.
Name the lockable units in DB2?
How to check table size in db2 sap?
What is db2 instance?
What is the maximum length of sqlca?
On which levels locks can be applied?
Discuss about db2 bind?
what is the sqlcode -501
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
What is query_cache_limit?
What is dpf in db2?