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

How do I import a csv file into db2?

558


What is meant by explain?

660


Define db2 and its databases?

617


What is buffer pool and list some of them?

627


Are views updateable?

639






Name the lockable units in DB2?

661


What is runstats and reorg in db2?

791


What is dclgen in db2?

673


What are the contents of dclgen?

652


What is null in db2?

571


What is a Foreign Key?

654


How is the value function used?

600


Which component is responsible for processing sql statements and selecting access paths?

661


What is check constraint in db2?

603


Explain packages.

655