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...

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

How to resolve deadlock issue

20044


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

2369


What is explain plan in db2?

967


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

2199


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

2903


What are the bind parameters ibm db2?

1024


What is reorg and runstats in db2?

1203


What is the use of commit in db2?

1055


Why do chiropractors use drop table?

1083


Is ibm db2 free?

994


Is db2 a database?

945


What action db2 takes when a program aborts in the middle of a transaction?

1132


What is the use of db2 optimizer?

1085


What is bufferpool in db2?

1026


What does sqlcabc has?

1030