What is the SQL query to select, delete and get count of
duplicate rows in DB2?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / hkhatri27
SELECT Columns
FROM Table
GROUP BY Columns
HAVING COUNT(*) > 1;
~ Himanshu
Is This Answer Correct ? | 2 Yes | 2 No |
What DB2 Catalog column tell you when an index needs table reorganized ?
what are extents?
What is runstats utility in db2?
What is UNION,UNION ALL?
pls tell me abt the normalization five types....
What Utility is used to migrate DB2 from one release to the next?
How do I add a column to an existing table in db2?
DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?
What do you mean by between and in? Is between inclusive of specified range values?
What is the use of runstats in db2?
What is DCLGEN ?
What is the difference between dbm cfg and db cfg file in db2 ?