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 / harsha

The first answer is correct. It has a logic to select only
ODD rows(look at the two fetch statements).

Another logic to select only ODD rows.
SELECT SAL FROM EMP WHERE MOD(SAL,2)=1

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why select is not preferred in embedded sql programs?

711


Mention the different locking levels that are available in db2.

643


What is dclgen (declaration generator)?

601


What is cobol db2?

568


What is a trigger in the db2 database?

592






Explain about open switch business continuity software?

563


What do you mean by storage group (stogroup)?

581


What is innodb buffer pool?

560


How can the firstname and the lastname from the emp table be concatenated to generate complete names?

744


How is a typical db2 batch pgm executed?

639


What is an instance database?

598


What is dbrm? When it will be created?

595


What is the difference between bind and rebind in db2?

848


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1234


What is db2 instance?

590