how to fetch multiple records without using cursor

Answers were Sorted based on User's Feedback



how to fetch multiple records without using cursor..

Answer / mahi

I think it can be done with the help of arrays or Tables(in
cobol)

Is This Answer Correct ?    1 Yes 2 No

how to fetch multiple records without using cursor..

Answer / krishna reddy

we must know max no of records we want to fetch.
suppose max no record 50...

01 host-variable.
02 employee occurs 50 times.
05 eno pic 9(4).
05 ename pic A(20).
05 esal pic 9(5).

Declare cursor c1 for select eno,ename,esal from emp;

open c1.

fetch c1 into :host-variable.

Is This Answer Correct ?    0 Yes 1 No

how to fetch multiple records without using cursor..

Answer / anto

The question is to fetch multiple records...not multiple
row(s)..
So this is possible with single select query.

Is This Answer Correct ?    0 Yes 1 No

how to fetch multiple records without using cursor..

Answer / srini

It is possible in DB2 V8

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More DB2 Interview Questions

what is a collection?

2 Answers  


select 100 records from million records ?

2 Answers   Verizon,


What is the use of reorg in db2?

0 Answers  


How can deadlocks be resolved?

0 Answers  


Is Cursor exicutable ?

3 Answers   TetraSoft,






What should be specified along with a cursor in order to continue updating process after commit?

1 Answers   IBM,


how many bytes timestamp token occupies?

6 Answers   Boss Global, Cap Gemini, TCS,


How to fetch the uncommited data from table ?

1 Answers   JPMorgan Chase,


What are the isolation levels possible ?

3 Answers  


What is the function of logging in the db2 database?

0 Answers  


Can a Db2 table data be retrived through JCL?

4 Answers  


What is lock escalation?

2 Answers  


Categories