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 |
How to check last update on table in db2?
What is DCLGEN ?
What is scrollable cursor in db2?
Are view updateable?
What is a system catalog table in db2?
i have cobol+ db2 program but it contains n number of subprograms for this how many dbrm members i need to mention in bind process
List out the data types available.
How do u achieve record level locking in DB2 versions when record level locking is not allowed?
What is the meaning of -805 SQL return code?
WHAT IS MEANT BY COMMIT COMMAND?
The only place of VSAM KSDS in DB2 is?
What is the difference between IN subselects and EXISTS subselect?