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

What is a db2 cursor?

613


Name the various locking levels available?

620


What is ibm db2 client?

512


What happens in bind step in a db2 program?

557


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

598






What is a db2 collection?

595


What is page size in db2?

557


What is drop table?

574


Define buffer pool.

616


How do you concatenate the firstname and lastname from emp table to give a complete name?

591


What is the use of db2?

574


What is the advantage in De-normalizing tables in DB2?

733


What is difference between alias and synonym in db2?

632


what is a corelated subquerry?

645


What do you mean by rollback?

562