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

What is the usage of open cursor command?

1099


What is bind in db2?

1034


What are the different types of base tables?

1087


What is sqlca’s maximum length?

1176


What is cursor with hold option in db2?

1065


How many databases are there?

1048


Mention the downsides of page level lock.

1159


What is null value in db2?

1016


What are the uses of db2 optimizer?

1290


What is meant by union and union all?

1006


What are union and union all?

976


What do you mean by rollback?

988


How to check last update on table in db2?

1051


what is the role of the cursor in db2?

1060


How to find the number of rows in db2 tables?

1059