cursor with hold explain ?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which isolation level provides maximum concurrency?

913


What is the use of reorg in db2?

835


What is schema in db2?

788


What is the latest version of ibm db2?

978


Which components manage deadlocks in db2?

819


When reorg is used?

871


What is the use of with ur in db2?

813


Outputs of explain are with matchcols = 0. What does this signify?

847


Give a brief description of db2 isolation levels?

798


How to create backup table in db2?

863


How can deadlocks be resolved?

741


What are the benefits of using the db2 database?

901


How to find the maximum value in a column in the db2 database?

831


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

7494


Explain correlated sub-queries.

777