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.
Answer Posted / 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 |
Post New Answer View All Answers
What is dbrm in db2 database?
What is a db2 schema?
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
What is cursor stability in db2?
What is the physical storage length of timestamp data type?
Why do we need reorg in db2?
What is host variable in db2 cobol?
What is the role of the data page in the db2 database?
How does coalesce work?
How to find primary key of a table in db2?
What is dpf in db2?
What parameters are used to control the free space in DB2?
How do I copy a table in db2?
Is db2 relational database?
What is db2? Explain.