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 cursor stability?
What is the usage of open cursor command?
query to just fetch first matching row and stop execution. once one matching row is found ..no more records should be checked.. if the first record is matching.. the query must stop
What techniques are used to retrieve data from more than one table in a single SQL statement?
How do you prepare a COBOL + DB2 program from coading till execution ?
Can DB2 be accessed by TSO users? If yes, which command is used to invoke DB2?
i have table agdet i want first 5 maximum commission which query will you write for this thanks in advance
Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?
DB2 is a A) data base/data communication system B) data base C) RDBMS D) Programming language
What are delete-connected tables?
we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?
What is meant by explain?