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

how will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this ...so i want to receive duplicates...

1 Answers   UST,


I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

3 Answers  


What is db2 purescale?

0 Answers  


what is commit & rollback? When and where is used while compiling a cobol-db2 program?

2 Answers  


Explain correlated sub-queries.

0 Answers  






Can you access the DB2 Directory table using SQL?

3 Answers  


what are the max. & min. no. of partitions allowed in a partition tablespace?

2 Answers   IBM,


can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?

1 Answers  


What action db2 takes when a program aborts in the middle of a transaction?

0 Answers  


What is REORG? When is it used?

4 Answers  


What is image copy in db2?

0 Answers  


my project is insurance management system,how to explain my work environment in interview?

2 Answers   CGI, Value Labs,


Categories