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
How to create db2 table in mainframe?
Is it possible using max on a char column?
Can one database have multiple instances?
What are the rules for db2 programming?
Outputs of explain are with matchcols = 0. What does this signify?
What is schema in db2?
What do you mean by rollback?
What is a collection in db2?
Define check constraint.
What is buffer pool?
What is dbrm?
What is the maximum size of a char data type in db2?
Can you use max on a char column?
What is reorg and runstats in db2?
What is the difference between db2 and oracle?