Suppose if I need to update a column, how you do that using
cursor?

Answers were Sorted based on User's Feedback



Suppose if I need to update a column, how you do that using cursor?..

Answer / bobby

continuation of previous answer,

after cursor declaration, open the cursor and fetch the cursor. When the condition for update is satisified isue EXEC SQL UPDATE CURRENT OF.

Is This Answer Correct ?    6 Yes 0 No

Suppose if I need to update a column, how you do that using cursor?..

Answer / sandy

EXEC SQL DECLARE X CURSOR FOR
SELECT * FROM ABC
FOR UPDATE OF <COLUMN> ==>If we know the column we would
like to update.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More DB2 Interview Questions

what is Runstats? Whem will u choose to runatats?

1 Answers   Danske,


if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records

4 Answers   UST,


How does DB2 determine what lock-size to use?

2 Answers  


What do you mean by rollback?

0 Answers  


What is the picture clause of the null indicator variable?

6 Answers  






My SQL is not performing well. Describe how will you fine tune it?

1 Answers   Accenture,


What is isolation level in db2?

0 Answers  


What is the use of COMMAREA ?Minimum how much data we can pass from it?

7 Answers   Cap Gemini,


How and when does the db2 enforces the unique key?

0 Answers  


How is the SUBSTR keyword used in sql?

1 Answers  


how can we find nth max salary from A table

5 Answers   IBM,


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

0 Answers  


Categories