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 |
Hi this is sures. i need to practice the ibm mainframes.could u telme how can i get userid from IBM.how much cost they will collect for one user id.can send me the details please.thanq
What is reorg in DB2
How to resolve -803 sql code in DB2?
what is the Foreign key? explain?
Which catalog table stores referential constraints?
What does this mean ? GRANT BIND,EXECUTE ON PLAN MK2 TO PUBLIC;
Define db2 and its databases?
What should be specified along with a cursor in order to continue updating process after commit?
I have some 3 particular fields ..i want to know which all tables have those 3 fields. Is there any way to identify.. can we know by quering system tables..
How to create a table using embedded sql?
How do you run JCL in cobol program
Explain the use of the WHERE clause.