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 / sudipta
the 4th answer is(ignore the previous one)
db2=> with t1(a,b,c) as (select id,name,row_number()
over(order by id desc) as aa from tab1) select * from t1
where c=2
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the use of reorg in db2?
How many databases can be created inside an instance in db2 ?
Mention the definition of cobol in varchar field.
What is the physical storage length of date data type?
What is the reason behind not using select * in embedded sql programs?
What is scrollable cursor in db2?
What are packages in db2?
What is the meaning concurrency in the db2 database?
How can deadlocks be resolved?
What is the use of predicate?
What is the advantage in De-normalizing tables in DB2?
What is the difference between dbm cfg and db cfg file in db2 ?
What is innodb buffer pool?
Which component is used to execute the sql statements?
How to find the number of rows in db2 tables?