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 |
How does db2 sample database connect?
if i made sme changes in sub pgm wht r the things to be done for this ?
what is REORG? what is the use?
How to execute stored procedure in db2 command editor?
Give the COBOL definition of a VARCHAR field.
What is the self-referencing constraint?
Is db2 relational database?
What is error -818 in db2. where can you find the timestamp of the DBRM and the source code.( precompile puts the timestamp on dbrm and source code correct?)
Outputs of explain are with matchcols = 0. What does this signify?
What is COPY PENDING status?
What is host variable in db2 cobol?
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?