what is the syntax for FOR UPDATE CLAUSE in cursor
declaration and how can u update using cursor? is it
possible to update multiple rows at a time.
Answers were Sorted based on User's Feedback
Answer / vaneesh khurana
EXEC SQL
DECLARE STUDENT-CSR CURSOR
SLECT NAME, CLASS, MARKS, STATUS
FROM STUDENT-TABLE
WHERE ROLL-NO = :WS-ROLL-NO
FOR UPDATE OF STATUS
END-EXEC
EXEC SQL
UPDATE STUDENT-TABLE SET STATUS =:WS-STATUS
WHERE CURRENT OF STUDENT-CSR
END-EXEC
| Is This Answer Correct ? | 6 Yes | 2 No |
If one wants to update multiple rows simply write a querry,
instead of using cursor.
| Is This Answer Correct ? | 3 Yes | 0 No |
Is ibm db2 free?
What are the three types of page locks that can be held?
Define db2.
What is the purpose of the WHENEVER statement?
if one db2 pgm calls another db2 pgm. how many plans do we need. what r the steps involved..
What is db2 bind?
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?
What is the difference between oracle and db2?
if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)
How do I copy a table in db2?
What should be specified along with a cursor in order to continue updating process after commit?
what is plan? is plan executable or package?