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
How to resolve deadlock issue
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is an instance database?
Outputs of explain are with matchcols = 0. What does this signify?
How to check table size in db2 sap?
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
What action db2 takes when a program aborts in the middle of a transaction?
What type of database is db2?
What is load replace in db2?
How do I import a csv file into db2?
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?
How to find the maximum value in a column in the db2 database?
What is data manager?
What is the use of dclgen in db2?
What is query_cache_limit?