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 |
What is phantom read in db2?
What parameters are used to control the free space in DB2?
What is scrollable cursor in db2?
What is page size in db2?
How do you filter out the rows retrieved from a Db2 table ?
How to resolve -917 sql code in DB2?
what is static sql? what is dynamic sql? Give me details
Describe the elements of the SELECT query syntax?
How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only)
How to execute stored procedure in db2 command editor?
can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well
i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?