Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of using commit?

1038


How can tablespace be moved to another dasd volume that is allocated for that tablespace?

1180


What is the latest version of ibm db2?

1197


What is the syntax for FETCH in DB2 ?

1136


Explain the contention situations caused by locks?

1010


Where can you declare a cursor in a cobol-db2 program?

993


What are the full forms of spufi and dclgen and why are they used?

1022


What is null indicator in cobol db2?

991


is it compulsory commitment control in journal?

2412


What is data manager?

993


How to execute stored procedures?

1055


How to create db2 table in mainframe?

1097


How can deadlocks be resolved?

888


Are view updateable?

973


What is the difference between plan and package in db2?

1035