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

Why do we use cursor?

0 Answers  


How to find the maximum value in a column in the db2 database?

0 Answers  


What are the advantages of using a PACKAGE?

2 Answers  


What is the purpose of the WHENEVER statement?

1 Answers  


What is auditing?

2 Answers  






What can the SET option of the Repair Utility accomplish?

1 Answers  


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

0 Answers   IBM,


When is the access path determined for dynamic SQL?

2 Answers  


Is schema the same as database?

0 Answers  


What are the bind parameters ibm db2?

0 Answers  


What is the STOSPACE Utility used for?

1 Answers  


What is a plan and package in db2?

0 Answers  


Categories