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 to resolve -818 sql code in DB2?
How can you count the number of rows from a table tab?
How can you get the number of rows impacted by the last executed query?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
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?
If I have a view which is a join of two or more tables, can this view be updateable?
What is the syntax for FETCH in DB2 ?
What is meant by index cardinality?
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
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?
What is the function of logging in the db2 database?
What is the maximum No of rows per page?