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 storage group (stogroup)?
How to connect to db2 database from windows command line?
What is declare cursor?
What is the use of db2 optimizer?
What is the difference between bind and rebind in db2?
Which command is used to connect to a database in DB2 ? Give the Syntax.
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?
How can the duplicate values be eliminated from db2 select?
How do I change the column size in db2?
What is dclgen in db2?
What is the physical storage length of date data type?
What are the different types of base tables?
i want to maintain uniqueness on pdf without make lf??????????
What is catalog database in db2?