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 kind of database is db2?

998


is it compulsory commitment control in journal?

2438


What is the syntax for seeing the columns and data types of a table in the db2 database?

1113


What r the comman abends in db2, jcl and cobol???????

2222


How do you concatenate the firstname and lastname from emp table to give a complete name?

1037


How to create backup table in db2?

1056


What is concurrency?

1173


What are the benefits of using the db2 database?

1174


How to run db2 command in windows?

1158


What is the information associated with sysibm.syslinks table?

1083


How do I import data from excel to db2?

1032


What is bind plan?

1006


What is db2?

1142


What is the advantage in De-normalizing tables in DB2?

1136


What is the difference between db2 and oracle?

1081