wht happens if we close cursor with cursor with hold option?
Answers were Sorted based on User's Feedback
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 |
Answer / 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 |
Answer / yuvaevergreen
A held cursor can be closed when
1.CLOSE cursor is issued.
2.ROLLBACK is issued.
3.Application terminates.
| Is This Answer Correct ? | 5 Yes | 2 No |
How do I delete a table in database?
how to u check the query is executing or not ?where will u check for sqlcode ?
What is a recovery log?
can any body explain about plan and pakage in detail....
Highlight all the advantages that are attached to a package.
What are foreign keys in db2?
What is query for your birthday date should be in hours,minute and seconds format?
What technique is used to retrieve data from more than one table in a single SQL statement?
Which isolation level provides highest data integrity?
database DSNDB01 means a.db2 catalog b.db2 directory c.BSDS d.active logs answer with reason please
Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?
What are the bind parameters ibm db2?