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

How to run db2 command in windows?

1245


Define buffer pool.

1100


I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

3263


How will you return the number of records in table?

986


What is page size in db2?

1025


What is the use of value function?

1205


what is diffrence b/w file-aid tool and file-aid utility???

4959


What is data manager?

1103


When reorg is used?

1182


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

1159


How to check table size in db2 sap?

1096


What is dclgen (declaration generator)?

1113


What is load replace in db2?

1048


what are bind concepts in db2 cobol?

1137


What are iseries servers?

1132