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 multi row fetch in db2?
Explain in brief how does db2 determine what lock-size to use?
When reorg is used?
Can there be more than one cursor open for any program?
How to connect to db2 database from windows command line?
How do you pull up a query which was previously saved in qmf?
Highlight all the advantages that are attached to a package.
How do I add a column in db2?
Differentiate between cs and rr isolation levels? Where do you specify them?
Define declaration generator (dclgen).
What is the cobol picture clause of the db2 data types date, time, timestamp?
What is a bind in db2?
What is an instance in db2?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
How to find the maximum value in a column in the db2 database?