a cursor normally gets closed once we provide a commit . If
u try to close the same cursor with close cursor command
later after providing the commit will there be any sql-error.

Answers were Sorted based on User's Feedback



a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

Answer / pavithra

when we try to close the cursor that is already closed, it
will return the SQL error code

-501 - cursor found in the fetch or close statement is not open.


please correct me if wrong

Is This Answer Correct ?    4 Yes 3 No

a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

Answer / manasa

WHEN THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS
NOT OPEN,then we get -501 error.

Is This Answer Correct ?    1 Yes 0 No

a cursor normally gets closed once we provide a commit . If u try to close the same cursor with cl..

Answer / mehdee

- If you do COMMIT in your program, that means you have
UPDATE, INSERT or DELETE, which in this case you must
DECLARE CURSOR WITH HOLD, then it will not be closed after
COMMIT.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More DB2 Interview Questions

How to resolve -818 sql code in DB2?

2 Answers   Cap Gemini,


How can you count the number of rows from a table tab?

0 Answers  


How can you get the number of rows impacted by the last executed query?

1 Answers  


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

0 Answers  


Shall i use this query to retrieve first 4 records, Select empno, sal from emptbl where empno < 5. like this can we fetch first 100 records?

3 Answers  


If I have a view which is a join of two or more tables, can this view be updateable?

0 Answers  


What is the syntax for FETCH in DB2 ?

0 Answers   MCN Solutions,


What is meant by index cardinality?

2 Answers  


how do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token

2 Answers   IBM, TRD,


In cursor program perform para varying until 1 by 1 fetch para cursor------close para in the blank what will come for confirming in the database?

1 Answers   HCL,


What is the function of logging in the db2 database?

0 Answers  


What is the maximum No of rows per page?

0 Answers   IBM,


Categories