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 is ibm db2 used for?

0 Answers  


Define db2 and its databases?

0 Answers  


If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1.select Ename from EMP wher Ename = 'raghava' 2.Select count(*) from EMP where Ename = 'raghava' What is SQLCODE shown up in SPUFI

4 Answers   ADP,


What is a predicate?

1 Answers  


can i code union in cobol-db2 pgm ?

4 Answers   Patni,


If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?

6 Answers  


What is meant by a unit of recovery?

1 Answers  


What is package in cobol db2?

0 Answers  


Why do chiropractors use drop table?

0 Answers  


what is difference between Static call and Dynamic call? How does it function?

1 Answers   Syntel,


Mention the downsides of page level lock.

0 Answers  


When is the authorization check on DB2 objects done - at BIND time or run time?

1 Answers  


Categories