suppose in my table 10 rows are there , i want to update odd
rows salary as 90000 ? how u do it ? any one help me ? what
do we use here cursor-fetch or normal sql ?

Answer Posted / vaneeshkhurana

Basically we can create a structure where first fetch then
update the fetch 2 times and update once again fetch 2 times
and update once again fetch 2 times and update once... and
keep on fetching 2 times and updating it once till table
code 100 comes.

This will update only the odd rows.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

642


What is ibm db2 connect?

570


Where do you specify them?

681


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

658


How to check last update on table in db2?

626






What is innodb buffer pool?

560


What is null indicator in cobol db2?

581


What is the role of data manager in the db2 database?

642


What is ibm db2 client?

517


What is a bind card?

679


Differentiate between cs and rr isolation levels? Where do you specify them?

580


What is catalog database in db2?

642


Explain the contention situations caused by locks?

589


Explain package in db2 and its advantages?

593


Can you use max on a char column?

638