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
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 |
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 |
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 |
How would one remove old reorg information from the DB2 catalog?
What does sqlcabc has?
What is cloudant database?
What is db2? Explain.
Which is faster delete or truncate?
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?
how can u nderstand the sql stmts executed successfully or not ?
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
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?
What is rct?
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?
What is cursor in dbms?