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 database reorganization?
What do you mean by storage group (stogroup)?
i want to maintain uniqueness on pdf without make lf??????????
What is table space in db2?
Explain the function done by data manager?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is null indicator in cobol db2?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
What does reorg do in db2?
What is database manager in db2?
What are db2 tables?
define clustering index.
What is difference between alias and synonym in db2?
Explain what are the various isolation levels possible?
What are the contents of dclgen?