Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

How to check last update on table in db2?

0 Answers  


What is DCLGEN ?

3 Answers  


What is scrollable cursor in db2?

0 Answers  


Are view updateable?

0 Answers  


What is a system catalog table in db2?

0 Answers  


i have cobol+ db2 program but it contains n number of subprograms for this how many dbrm members i need to mention in bind process

2 Answers  


List out the data types available.

0 Answers  


How do u achieve record level locking in DB2 versions when record level locking is not allowed?

2 Answers   IBM,


What is the meaning of -805 SQL return code?

3 Answers  


WHAT IS MEANT BY COMMIT COMMAND?

7 Answers   Wipro,


The only place of VSAM KSDS in DB2 is?

2 Answers   IBM,


What is the difference between IN subselects and EXISTS subselect?

1 Answers   HCL, PreVator, TCS,


Categories