wht happens if we close cursor with cursor with hold option?
Answer Posted / rohit mishra
Once u issued a close cursor statement , it will get closed.
You can not access it after that until u open it again.
In that case your procedure will exit with an error message
like
"SQL0501N The cursor specified in a FETCH or CLOSE
statement is not open. SQLSTATE=24501"
With hold option doesn't make any difference in this case.
But if you are doing a commint operation in between your
transactions then a cursor declared with 'with hold' option
will not get closed.
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
what is the role of the cursor in db2?
What are the uses of db2 optimizer?
Mention the various locks that are available in db2.
What are db2 objects?
Can you tell me how can you find out the # of rows updated after an update statement?
How to find the number of rows in a db2 table?
Mention the downsides of page level lock.
List down the types of triggers in the db2 database?
What is host variable?
Define buffer pool.
How do I delete a column in db2?
What is a bind card?
What is rebind in db2?
How to check sequence on a table in db2?
What is sqlca?