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 does it mean if the null indicator has -1, 0, -2?
What is a page in db2?
When can an insert of a new primary key value threaten referential integrity?
If I have a view which is a join of two or more tables, can this view be updateable?
What is pagespace?
What is a data page?
why db2 is called as universal database?what is the storage capacity of db2v9 n what are the advantages of db2
What is the difference between primary key & unique index ?
What are the disadvantages of PAGE level lock?
What is the error code -803 ?
How do you retrieve the first 5 characters of firstname column of db2 table emp?
What is meant by explain?