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
Is db2 relational database?
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
Mention the various locks that are available in db2.
Discuss about db2 bind?
How many databases are there?
what is the role of the cursor in db2?
What is the use of commit in db2?
What do you mean by rollback?
What is syscat in db2?
What is the syntax for FETCH in DB2 ?
How to get the ddl of a table in db2?
What is schema in db2?
What is the use of db2?
Can you tell me how can you find out the # of rows updated after an update statement?
What does sqlcabc has?