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



I want to fetch the 10th row of a table which has been changed.How can I do it without going thru ..

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

I want to fetch the 10th row of a table which has been changed.How can I do it without going thru ..

Answer / divya,roshini,tiny

use scrollable cursor for fetching the 10th row

Is This Answer Correct ?    4 Yes 0 No

I want to fetch the 10th row of a table which has been changed.How can I do it without going thru ..

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

I want to fetch the 10th row of a table which has been changed.How can I do it without going thru ..

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

I want to fetch the 10th row of a table which has been changed.How can I do it without going thru ..

Answer / satish.klnm

exec sql
select * from table222 where count(*) > 9
end-exec.

Is This Answer Correct ?    0 Yes 14 No

Post New Answer

More DB2 Interview Questions

What are the isolation levels possible ?

3 Answers  


What is the size of a data page?

2 Answers   IBM,


In BIND, isolation level parameter specifies the duration of page lock and ACQUIRE, RELEASE also do almost the same thing. What is the exact difference between the two? Do they work in conjunction while executing SQL queries and obtaining locks?

8 Answers   Syntel,


Plan is an executable form of sql statements,But what exactly resides inside a Plan. what are the details inside Plan.

2 Answers   IBM,


What is image copy?

1 Answers   Virtusa,






What is syscat in db2?

0 Answers  


What is dclgen (declaration generator)?

0 Answers  


How can you compare table column after update and before update?

5 Answers   Satyam,


Define declaration generator (dclgen).

0 Answers  


How does one remove entries from the SCT02 table?

1 Answers  


Which command is used to connect to a database in DB2 ? Give the Syntax.

0 Answers   MCN Solutions,


which is the most efficient tablespace?? a.simple tablespace. b.partitioned tablespace. c.segmented tablespace. d.none of the above. please post answer with the reason.?

3 Answers  


Categories