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 the difference between primary key & unique index ?

6 Answers   Patni, Temenos,


Explain the function done by data manager?

1 Answers  


what are the bind parameters?

5 Answers   IBM,


what are stage one indexable predicates?

1 Answers  


What is netezza database?

1 Answers  


What does a deadlock mean in DB2?

1 Answers  


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

1 Answers  


I want to fetch the 10th row of a table which has been changed.How can I do it without going thru all the rows.

5 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  


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

1 Answers  


Which are the db2 tools to protect integrity of the database?

1 Answers   IBM,


What is the maximum length of sqlca?

1 Answers  


Categories