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
Why do we use cursor?
What is the purpose of using commit?
How do I delete a table in db2?
Are views updateable?
can we view the access paths created by dbrm ? how ? thx
What is the use of commit in db2?
What do you mean by commit and rollback?
What is a db2 cursor?
What is sqlca’s maximum length?
How does db2 sample database connect?
What is the cobol picture clause of the db2 data types date, time, timestamp?
What's The Percentage Free Space ?
How do you stop a db2 database in linux?
What is the physical storage length of the data types date, time, and timestamp?
How to check last update on table in db2?