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

Declare:
EXEC SQL
DECLARE CURSOR C1 FOR SELECT SAL FROM EMP FOR
UPDATE SAL
END-EXEC.
OPEN:
OPEN C1
FETCH:
PERFORM UNTILL SQLCODE=100
FETCH C1 INTO :SAL
UPDATE EMP SET SAL=9000 WHERE CURRENT OF C1
FETCH C1 INTO :SAL
END-PERFORM

Is This Answer Correct ?    10 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default page size of buffer pools?

1070


What is collection in db2 bind?

961


What is cursor with hold option in db2?

1010


What are foreign keys in db2?

1034


Mention the location where the output received from explain statement is stored.

1054


What is release/acquire in bind?

1057


What is the difference between using bind () and rebind () methods of naming class?

1328


What is the role of union all and union

1069


What is with ur in db2?

1243


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

4214


What is dpf in db2?

1048


What is the reason behind not using select * in embedded sql programs?

1044


What is copy pending status in db2?

1068


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

1023


Why select is not preferred in embedded sql programs?

1228