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 |
What is the difference between cursor stability and repeatable read isolation levels?
what is the total syntax for fetch ? can any one please give me all the details of fetch ? thx
Explain what are the various isolation levels possible?
What is dbrm? What it contains?
What is a DB2 access path?
what is consistency token
What does this mean ? GRANT BIND,EXECUTE ON PLAN MK2 TO PUBLIC;
What's the maximum number of volumes that can be added to a STOGROUP?
What is difference between rollback and commit?
How to find the maximum value in a column in the db2 database?
What is the advantage in De-normalizing tables in DB2?
What is scrollable cursor in db2?