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 scrollable cursor in db2?
What is the usage of open cursor command?
How do you concatenate the firstname and lastname from emp table to give a complete name?
How does db2 sample database connect?
How will you return the number of records in table?
What is cursor in dbms?
Mention the different locking levels that are available in db2.
What is collection in db2 bind?
What is a system catalog table in db2?
What are the bind parameters ibm db2?
List down the types of triggers in the db2 database?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
Is db2 a database?
How can record locking be achieved in those DB2 versions which do not support it?
What is buffer pool in the db2 database?