What is the significance of the CURSOR WITH HOLD clause in
a cursor declaration?

Answers were Sorted based on User's Feedback



What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?..

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

What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?..

Answer / ss

To remain cursor open after commit statement execution

Is This Answer Correct ?    33 Yes 0 No

What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?..

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

What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?..

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

Post New Answer

More DB2 Interview Questions

What are the various locking levels available?

3 Answers  


How does one remove entries from the SCT02 table?

1 Answers  


What is meant by explain?

0 Answers  


How is the value function used?

0 Answers  


What is the COBOL picture clause of the following DB2 data types: DATE, TIME, TIMESTAMP?

3 Answers  






While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?

4 Answers   CTS, IBM,


Can we declare cursor in Procudere division or open the cursor in the Working storage section. Is there any particular rules in the usage of cursors lifecycle

1 Answers   Infosys,


What is a page in db2?

0 Answers  


How will you delete duplicate records from a table?

7 Answers   Google,


How can the duplicate values be eliminated from db2 select?

0 Answers  


In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.

5 Answers   CTS,


What is db2 isolation?

2 Answers  


Categories