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 |
Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened?
What are the various isolation levels possible?
What is a base table?
can all users have the privilage to use the sql statement select * (dml)?
What is the self-referencing constraint?
What is a plan and package in db2?
How do you run JCL in cobol program
what is the name of the default db2 catalog database?
What do you mean by between and in? Is between inclusive of specified range values?
What is collection in db2 bind?
What are simple, segmented and partitioned table spaces ?
What is a DB2 access path?