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 the use of commit in db2?
What are the different types of base tables?
Explain what are the various isolation levels possible?
What's The Percentage Free Space ?
How does a cursor work?
What is an instance in db2?
While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?
Can you tell me how can you find out the # of rows updated after an update statement?
Is db2 free?
Explain in brief how does db2 determine what lock-size to use?
How does cobol compile db2 program?
What is the difference between cursor and select statement?
How is the value function used?
What is a system catalog table in db2?
How do you simulate the explain of an embedded sql statement in spufi/qmf?