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 / mahyn

select * from tablename
order by primary_key desc
fetch first 5 rows only
with ur;

can be one way...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cursor stability in db2?

1414


How can record locking be achieved in those DB2 versions which do not support it?

1128


What happens in bind step in a db2 program?

1012


What type of database is db2?

1019


What is copy pending status in db2?

1184


What is db2? Explain.

1110


can all users have the privilage to use the sql statement select * (dml)?

1222


What is consistency token in db2?

1194


What is a db2 package?

1125


What is meant by union and union all?

1051


Which component is responsible for processing sql statements and selecting access paths?

1178


How to get the ddl of a table in db2?

1168


What is the difference between spufi and qmf?

1204


What is the role of the data page in the db2 database?

1082


What is the role of union all and union

1187