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 is the maximum number of tables that can be joined ?
What is db2 optimizer?
Give the COBOL definition of a VARCHAR field.
What is image copy?
Can you search give an array in the WHERE clause of a db2 query?
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..
Can a array declared with an index be displayed(readable format) in spool?
DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?
What's the maximum number of characters that a tablename can have?
What are the four lockable units for DB2?
In cursor program perform para varying until 1 by 1 fetch para cursor------close para in the blank what will come for confirming in the database?
What is the use of dclgen in db2?