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 will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this ...so i want to receive duplicates...
What is the difference between IN subselects and EXISTS subselect?
How to resolve -917 sql code in DB2?
What are leaf pages?
What is alias in db2?
when we are trying to update db2 rows. if the program abends . how we will know that the last successful update row was
Mention the various locks that are available in db2.
When Can you be sure that a query will return only one row?
what is the soft code for deadlock ?
What are the three types of page locks that can be held?
in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert
where can we use index and subscript ? with example ?