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 dbrm in db2 database?
What is a db2 table?
Name the lockable units in DB2?
How do I start db2 in windows?
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
Why cursor is used in db2?
What is a trigger in the db2 database?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
What is a collection in db2?
How can you quickly find out the # of rows updated after an update statement?
What is a db2 cursor?
What is db2 purescale?
How can record locking be achieved in those DB2 versions which do not support it?
What do you mean by rollback?
What is temporal table in db2?