wht happens if we close cursor with cursor with hold option?

Answer Posted / ratheesh nellikkal

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 ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does db2 stand for?

596


Explain how can you do the explain of a dynamic sql statement?

649


What is the role of data manager in the db2 database?

642


What is temporal table in db2?

601


What is blu acceleration in db2?

603






How to check last update on table in db2?

626


Why cursor is used in db2?

572


What is a plan and package in db2?

619


What is with ur in db2?

753


What is the use of db2?

586


What is bind and rebind in db2?

646


Explain about open switch business continuity software?

563


What is dclgen (declaration generator)?

601


What are packages in db2?

595


Outputs of explain are with matchcols = 0. What does this signify?

617