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 query_cache_limit?

977


What is reorg?

1164


Explain package in db2 and its advantages?

1219


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

1072


Is db2 free?

1099


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

1048


How do I import data from excel to db2?

1077


What are the bind parameters ibm db2?

1055


Discuss about db2 bind?

1103


What type of database is db2?

971


Is db2 a programming language?

1054


What is page size in db2?

979


What is null in db2?

1030


Where do you specify them?

1289


Explain the contention situations caused by locks?

1073