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 are db2 objects?
What is catalog database in db2?
How do you concatenate the firstname and lastname from emp table to give a complete name?
What is sqlca’s maximum length?
Define buffer pool.
How does a cursor work?
What is the role of schema in the db2 database?
Name the various locking levels available?
What is precompiler in db2?
What is host variable in db2 cobol?
Define sqlca.
What is dbrm library?
What is a system catalog table in db2?
What does db2 stand for?
Explain about rct in db2?