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 would one remove old reorg information from the DB2 catalog?

2 Answers  


What does sqlcabc has?

0 Answers  


What is cloudant database?

0 Answers  


What is db2? Explain.

0 Answers  


Which is faster delete or truncate?

0 Answers  






Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find out which Will precompile of an DB2-COBOL program bomb, if DB2 is down?

1 Answers  


how can u nderstand the sql stmts executed successfully or not ?

1 Answers   TCS,


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,


Hi , I am posting some interview ques . what is the use of cursors ? what is the diff between select and cursor ? bith are used for data retrival .. rite?

2 Answers   Deloitte,


What is rct?

0 Answers  


i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?

4 Answers  


What is cursor in dbms?

0 Answers  


Categories