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 |
Bind concepts in DB2 cobol
10 Answers IBM, TCS, TRD, Virtusa,
How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause)
Describe major components of db2?
how to take the back up of the DB2 table.
if suppose i am having an ACCOUNT table with 3 coloumns ACC. NO,ACC. NAME,ACC. AMOUNT . If a unique index is also defined on ACC.NO and ACC.NAME then write a query to retrieve account holders records who have more than 1 ACC.
Mention the location where the output received from explain statement is stored.
db2 restart logic ?
my project is insurance management system,how to explain my work environment in interview?
How will fetch last 5 rows from table in db2
What is dclgen (declaration generator)?
What is data manager?
cursor with hold explain ?