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 phantom read in db2?

0 Answers  


What parameters are used to control the free space in DB2?

0 Answers  


What is scrollable cursor in db2?

0 Answers  


What is page size in db2?

0 Answers  


How do you filter out the rows retrieved from a Db2 table ?

1 Answers  






How to resolve -917 sql code in DB2?

3 Answers   Cap Gemini,


what is static sql? what is dynamic sql? Give me details

3 Answers  


Describe the elements of the SELECT query syntax?

3 Answers  


How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only)

2 Answers  


How to execute stored procedure in db2 command editor?

0 Answers  


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

0 Answers  


i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?

4 Answers  


Categories