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...

How will fetch last 5 rows from table in db2

Answer Posted / mayur bhayani

SELECT * FROM (SELECT * FROM T ORDER BY pk DESC FETCH FIRST 5 ROWS) AS X
ORDER BY PK;

Is This Answer Correct ?    3 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of data manager.

1007


How would you find out the total number of rows in a db2 table?

1007


How does cobol compile db2 program?

1023


Name the lockable units in DB2?

1088


What is a storage group (stogroup)?

1202


What is null value in db2?

973


What is the information associated with sysibm.syslinks table?

1082


What are db2 objects?

1012


What is the use of runstats in db2?

1053


What is cascading rollback?

1151


What is the latest version of ibm db2?

1220


What is explain plan in db2?

949


What do you mean by storage group (stogroup)?

1001


What do you mean by commit and rollback?

996


Why do we need reorg in db2?

938