cursor with hold explain ?



cursor with hold explain ?..

Answer / ratheesh nellikkal

Hi All,
Cursor is nothing but a pointer to a result set that you
get as a result of executing a query.
So if u wanna some operations using this cursor then u have
to
1. Declare a cursor
2.Open the cursot before the first access
3.Do the operations
4.Close the cursor.

But in case of a normal cursor (not declared with 'with
hold' option) in between the operations if u issued a
commit command then the cursor will be getting closed and
if u wanna access it again then u should open it again.

But incase of a 'With hold' cursor it will maintane the
states if you issed a commit also.
Means it will not get closed by applying frequent commit.

Regards,
Ratheesh Nellikkal

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More DB2 Interview Questions

What are the bind parameters ibm db2?

0 Answers  


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,


What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.

1 Answers   Cap Gemini,


query to just fetch first matching row and stop execution. once one matching row is found ..no more records should be checked.. if the first record is matching.. the query must stop

2 Answers   IBM,


What is meant by dclgen?

0 Answers  






Which component is responsible for db2 startup and shutdown?

0 Answers  


what is a collection?

2 Answers  


What will the COMMIT accomplish?

5 Answers  


What does it mean if the null indicator has -1, 0, -2?

1 Answers  


What is difference between *omit and *nopass?

1 Answers   IBM, TCS,


db2 restart logic ?

1 Answers   DELL, HTC, UHG,


What does reorg do in db2?

0 Answers  


Categories