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

Explain the benefits you can get from mainframe connect?

956


What kind of database is db2?

1022


How do we specify index to include or not during bind process.

2107


How do I delete a table in db2?

1052


Which isolation level provides highest data integrity?

1093


Describe major components of db2?

1082


What is bufferpool in db2?

1026


What is db2?

1160


Define declaration generator (dclgen).

1097


What does db2 blu stand for?

1143


What is cobol db2?

981


What is db2 stogroup?

1142


How to connect to db2 database from windows command line?

1038


What is page size in db2?

958


What is runstats utility in db2?

1001