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

quary for
1> fetch last record
2> fetch in reverse order
3> fetch last 5 row
4> fetch second last record (their is no primary key)
i think concept of count can be use for this in 4th

Answer Posted / pavan

please try this one and let me know....


select * from emp where :ws-rec-cnt = (select Count(*)
into :ws-rec-cnt from emp);

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to resolve deadlock issue

20315


How do you simulate the explain of an embedded sql statement in spufi/qmf?

1139


What is an instance database?

1096


Outputs of explain are with matchcols = 0. What does this signify?

1109


How to check table size in db2 sap?

1095


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

1534


What action db2 takes when a program aborts in the middle of a transaction?

1193


What type of database is db2?

1018


What is load replace in db2?

1046


How do I import a csv file into db2?

1039


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

2436


How to find the maximum value in a column in the db2 database?

1125


What is data manager?

1101


What is the use of dclgen in db2?

1135


What is query_cache_limit?

1034