Answer Posted / bala
If the query inside the program retrieves only one row, there is no need to CURSOR.
If the program has to process the multiple rows that are retrieved by the query,
CURSOR is needed. Because, host variables can accommodate data from only one row at a time. By Declaring the cursor, multiple rows can be fetched one at a time and assign it to host variables for processing.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the maximum size of varchar data type in db2?
Why do we bind in db2?
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
What is database manager in db2?
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 .....
What does db2 stand for?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
What is drop table?
i want to maintain uniqueness on pdf without make lf??????????
What is db2 purescale?
How to find the number of rows in db2 tables?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
What is temporal table in db2?
What is a trigger in the db2 database?
Explain how can you do the explain of a dynamic sql statement?