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
What is cloudant database?
What is temporal table in db2?
What is the usage of open cursor command?
What is access path in db2?
What is the difference between bind and rebind in db2?
What is an instance database?
How to check last update on table in db2?
Define predicate?
What are the prerogatives?
What are db2 tables?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
Mention some fields that are a part of sqlca.
What is the difference between cursor stability and repeatable read isolation levels?
Why do we bind in db2?
List down the types of triggers in the db2 database?