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 can we retrieve the 100 records of the file ?
For Null indicator we have 3 values 0,-1,-2. 0->Not nulll -1->Null -2->Value truncated If ther is any possibility to have any positive value other than 0 in Null indicator.If it is so then when we will get and what is the value?
How do I delete a column in db2?
List out the data types available.
What is SPUFI?
What is a Resource Control Table(RCT)? Describe its characteristics.
i have cobol+ db2 program but it contains n number of subprograms for this how many dbrm members i need to mention in bind process
How can you get the number of rows impacted by the last executed query?
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
i have one file having 100 of records? i want to display it like 20 records in one column and 20 records in another column total 40 records per page ? how ?
How do I change the column size in db2?
What is db2 plan table?