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
Which component is responsible for processing sql statements and selecting access paths?
What is a db2 schema?
What is the meaning concurrency in the db2 database?
How do I add a column to a table in db2?
What is the difference between drop table and delete table?
What is the physical storage length of time data type?
is it compulsory commitment control in journal?
What is db2 catalog database?
What do you mean by between and in? Is between inclusive of specified range values?
Give a brief description of db2 isolation levels?
How do you find the maximum value in a column in db2?
can we view the access paths created by dbrm ? how ? thx
How do I import a csv file into db2?
How to restart a DB2 program?
What is the default page size of buffer pools?