I want to fetch the 10th row of a table which has been
changed.How can I do it without going thru all the rows.
Answers were Sorted based on User's Feedback
Answer / m4io
DECLARE cursor_name sensitivity SCROLL CURSOR FOR
SELECT ... FROM ...
FETCH ABSOLUTE 10 FROM cursor_name
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / divya,roshini,tiny
use scrollable cursor for fetching the 10th row
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / andyb
Why?
How do you know the one you want is still the 10th row ?
Other updates may have taken place.
If you know the key for the record you want then use that
Otherrwise unless the table has a sequential numeric key
then I think you have to go through the rows.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / nadeem
Use any one column name and its value of the 10th row to
fetch the 10th..for eg
select * from Table where deptno = 0010(any column name and
its value of 10 row)
| Is This Answer Correct ? | 1 Yes | 5 No |
Answer / satish.klnm
exec sql
select * from table222 where count(*) > 9
end-exec.
| Is This Answer Correct ? | 0 Yes | 14 No |
How to see the structure of db2 table??
How to find schema of a table in db2?
What is the meaning concurrency in the db2 database?
What if , we failed to mentioed null indicator in sql select query , that may retrieve null value ?
Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find out which Will precompile of an DB2-COBOL program bomb, if DB2 is down?
What is drop table?
wht r the requirements for writing a cobol-db2 pgm ?
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
Is db2 a mainframe database?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
pls tell me abt the normalization five types....