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 a collection?
select 100 records from million records ?
What is the use of reorg in db2?
How can deadlocks be resolved?
Is Cursor exicutable ?
What should be specified along with a cursor in order to continue updating process after commit?
how many bytes timestamp token occupies?
6 Answers Boss Global, Cap Gemini, TCS,
How to fetch the uncommited data from table ?
What are the isolation levels possible ?
What is the function of logging in the db2 database?
Can a Db2 table data be retrived through JCL?
What is lock escalation?