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

can we update the table by using cursors can anyone post
the query?

Answer Posted / amar

DECLARE
INT NUMBER:=0;
CURSOR C1 IS
SELECT COL1,COL2 FROM TABLE_NAME;
BEGIN
FOR RC IN C1 LOOP
UPDATE TABLE_NAME SET COL_NAME=RC.COL1,COL_NAME=COL2;
CNT:=CNT+1;
END LOOP;
END;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1160


Which command is used to remove all rows from a table?

1183


What do you mean by commit and rollback?

1091


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

2094


Explain about cursor stability?

1113


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

1174


What is a plan and package in db2?

1157


What is cloudant database?

1161


is it compulsory commitment control in journal?

2523


How can record locking be achieved in those DB2 versions which do not support it?

1134


Is db2 relational database?

1049


List down the data types in the db2 database.

1186


What is a storage group (stogroup)?

1292


What is the meaning concurrency in the db2 database?

1172


Are views updateable?

1236