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 to compare data between two tables in db2?
Is the primary key a clustered index?
List some fields from sqlca?
can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well
What are the various locking levels available?
What is the difference between bind and rebind in db2?
What is a collection?
In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.
What is the purpose of the QUIESE Utility?
how can i pull up a query which was previously stored in qmf
What is the meaning concurrency in the db2 database?
What is catalog database in db2?