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
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
What is plan in cobol db2?
What is package in cobol db2?
What is db2 plan table?
What is the difference between db2 and oracle?
What is a db2 table?
What db2 400?
Mention a credible reason why select* is never given preference in an sql program that has been embedded.
What is db2 instance?
What are the various isolation levels possible?
How do I change the column size in db2?
What is dclgen (declaration generator)?
Mention data types used in db2 ?
What is the use of with ur in db2?
What are the contents of a dclmgen?