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

Define data page.

0 Answers  


how to resolve -805. give clear explination for that

2 Answers   IBM,


Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?

1 Answers  


What is an intent lock?

3 Answers  


When do you specify the isolation level? How?

1 Answers  






What is DCLGEN ?

3 Answers  


select * from orders where odate between '2010-01-01'and '2010-03-31' How do u fetch this into cursor?

2 Answers  


What is dclgen (declaration generator)?

0 Answers  


Mention the various locks that are available in db2.

0 Answers  


Which catalog table stores referential constraints?

1 Answers  


I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?

6 Answers   Perot Systems,


What is data manager?

0 Answers  


Categories