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 do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token
What is a composite index and how does it differ from a multiple index?
When do you use the IMAGECOPY?
What is rct?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What are data types?
I am having n number of records in a table which consists of emp-name is one of the field among them. Now i want to change the first letter of every name with capital.
Before you give the explain statement, what are the prerogatives?
difference between group clause and order clause
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
Give the name of some fields form sqlca.
What is auditing?