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
How do I add a column in db2?
is it compulsory commitment control in journal?
What are the benefits of using the db2 database?
What are the various data types available in db2?
What is db2 command?
Can we delete records from view?
What is reorg and runstats in db2?
What is difference between isnull and coalesce?
When reorg is used?
Is it possible using max on a char column?
What is the advantage in De-normalizing tables in DB2?
What do you mean by cursor?
How many databases are there?
Mention data types used in db2 ?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?