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.
Answer Posted / 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 |
Post New Answer View All Answers
How do I copy a table in db2?
What is a page in db2?
What is the use of with ur in db2?
What is the syntax for seeing the columns and data types of a table in the db2 database?
What is runstats utility in db2?
What is the result of open cursor statement?
What is syscat in db2?
Is db2 a mainframe database?
Explain the contents that are a part of dclgen.
Name the lockable units in DB2?
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
What is a collection in db2?
What are concurrency issues?
How can you count the number of rows from a table tab?