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

What is the difference between oracle and db2?

587


What is a db2 package?

599


What is the maximum No of rows per page?

626


What kind of database is db2?

572


What does reorg do in db2?

578






DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2278


How do I delete a table in database?

599


Define predicate?

643


what are bind concepts in db2 cobol?

651


What is null indicator in cobol db2?

585


What is db2?

741


How to execute stored procedures?

620


What is bind and rebind in db2?

648


What is innodb buffer pool?

564


How to restart a DB2 program?

1364