I have 3 cursors declared. Cursor1 retieves some data.
Based on this curso2 will also fetches some data. In cursor3
(using for some updation) I'm using the data retrieved by
the above 2 cursor. My question is, while working with
cursor3, periodically if I give commit, will all the three
crsors will be closed or only cursor3 will be closed?

Answers were Sorted based on User's Feedback



I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some..

Answer / sridhar

COMMIT will close all the cursors, if the cursors are not
delcared using 'WITH HOLD'.

Is This Answer Correct ?    37 Yes 0 No

I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some..

Answer / purushotham

Obviously it will close all the cursors.

Is This Answer Correct ?    3 Yes 2 No

I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some..

Answer / srisri

COMMIT will close all the cursors, if the cursors are not
delcared using 'WITH HOLD'.

Is This Answer Correct ?    1 Yes 0 No

I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some..

Answer / r.l.v.krishna

COMMIT WILL CLOSE ALL THE CURSORS IF U R NOT MENTIONED WITH HOLD OPTION IN THE DECLARATION PART OF THE CURSOR....

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records

4 Answers   UST,


What are some characteristics of columns that benefit from indexes?

1 Answers  


How will you delete duplicate records from a table?

7 Answers   Google,


What is a collection?

3 Answers  


How does one remove entries from the SCT02 table?

1 Answers  






What DB2 Catalog column tell you when an index needs table reorganized ?

1 Answers  


i want to maintain uniqueness on pdf without make lf??????????

0 Answers  


when does the SQL statement gets executed when you use cursor in the application programming ?

3 Answers   IBM,


How to resolve -803 sql code in DB2?

3 Answers   Cap Gemini,


How to get the ddl of a table in db2?

0 Answers  


What are the abend codes occour in ur latest PROJECT in DB2

2 Answers   Cap Gemini,


What is the maximum size of a char data type in db2?

0 Answers  


Categories