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



what is the syntax for FOR UPDATE CLAUSE in cursor declaration and how can u update using cursor? ..

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

what is the syntax for FOR UPDATE CLAUSE in cursor declaration and how can u update using cursor? ..

Answer / vaneesh khurana

If one wants to update multiple rows simply write a querry,
instead of using cursor.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the difference between cursor stability and repeatable read isolation levels?

0 Answers  


what is the total syntax for fetch ? can any one please give me all the details of fetch ? thx

2 Answers   IBM,


Explain what are the various isolation levels possible?

0 Answers  


What is dbrm? What it contains?

0 Answers  


What is a DB2 access path?

1 Answers  






what is consistency token

3 Answers  


What does this mean ? GRANT BIND,EXECUTE ON PLAN MK2 TO PUBLIC;

4 Answers   Accenture,


What's the maximum number of volumes that can be added to a STOGROUP?

1 Answers   IBM,


What is difference between rollback and commit?

0 Answers  


How to find the maximum value in a column in the db2 database?

0 Answers  


What is the advantage in De-normalizing tables in DB2?

0 Answers  


What is scrollable cursor in db2?

0 Answers  


Categories