how to fetch multiple records without using cursor

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a bind in db2?

594


What is db2 stogroup?

679


What are foreign keys in db2?

616


What is plan in cobol db2?

595


What is a trigger in the db2 database?

596






Which component is responsible for db2 startup and shutdown?

630


How do I create a view in db2?

606


What is runstats db2?

585


When reorg is used?

678


What is the syntax for FETCH in DB2 ?

677


What is package in cobol db2?

704


What is a buffer in memory?

601


What is catalog database in db2?

646


Are view updateable?

631


What is performance tuning db2?

620