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 |
What is plan in cobol db2?
What is dclgen (declaration generator)?
Select empno, sal from emptbl where empno < 101.By this query can we fetch first 100 recs? where empno is primary key.It won't throw -811 error? if it wont,then what is use of cursor technique while fetching first 100 recs. Please need more clarification.
what is a plan and how do you refer the plan in the program?
What is the purpose of the DSNC transaction ?
What is meant by a unit of recovery?
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
i have table agdet i want first 5 maximum commission which query will you write for this thanks in advance
Give the name of some fields form sqlca.
how to resolve -811 sqlcode .give clear explaination
What is database manager in db2?
How do you leave the cursor open after issuing a COMMIT? (for DB2 2.3 or above only)