What is the significance of the CURSOR WITH HOLD clause in
a cursor declaration?
Answers were Sorted based on User's Feedback
Answer / abhisek
As soon as the COMMIT statement is executed in a
program,the cursor gets automatically closed,So we need to
give CURSOR WITH HOLD clause,in order to keep it open after
execution of the COMMIT statement.
| Is This Answer Correct ? | 43 Yes | 2 No |
Answer / ss
To remain cursor open after commit statement execution
| Is This Answer Correct ? | 33 Yes | 0 No |
Answer / yogendra shinde
Hi,
CURSOR with WITHOLD is very useful where we need to use
more than 1 database simultaneously.
Suppose you are reading or fetching a value from local
database and updating those retrieved values in a remote
DB. In such case when you connect to remote DB, you need to
use WITHOLD for local db. So that you don't loose the
cursor position for local db.
For further ref. do read more about CONNECT.
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / mainframe virumbi
The answers given above is correct only. Adding those, we
cant execute sql statements other than select, after commit
is encountered.
| Is This Answer Correct ? | 8 Yes | 1 No |
how can you access index
How is a typical db2 batch pgm executed?
i hav created a program and moved to production but failed to create the table which is been used in the program. the program shows error as soon as it is moved or installed in production or shows error during its runtime. what is the sqlcode for this error
What is null in db2?
What is the role of schema in the db2 database?
how to identify the pseudo conversation by seeing the program
What is UNION,UNION ALL?
What's The Error Code For Unique Index Voilation?
I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?
how to resolve -805 . how to see dbrm and package not found
How can you compare table column after update and before update?
What is the maximum length of a column name in DB2? 18 or 30 or anything other than these?