how to fetch multiple records without using cursor
Answers were Sorted based on User's Feedback
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 |
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 |
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 do I optimize a query in db2?
What is ibm db2 client?
What is the difference between CS and RR isolation levels?
What is the syntax for FETCH in DB2 ?
Is db2 relational database?
What is DCLGEN ?
can any one give the list of some important sql abend codes which r frequently asked in interviews?
How to select the duplicate rows from a table?
What is a root page?
What is the syntax of SELECT statement when embedded in a COBOL program?
What is consistency token in db2?
What is the difference between TYPE 1 index & TYPE 2 index