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

In db2, how do you insert multiple rows in 1 query using a.)
Cursors, b.) Normal query?? Give syntax for both.

Answer Posted / adi

MOVE +100 TO HV-NUM-ROWS.
INSERT INTO EMP
(EMPNO, LASTNAME, FIRSTNME,
MIDINIT, SALARY, BONUS)
VALUES (:HV-EMPNO-ARRAY,
:HV-LASTNAME-ARRAY,
:HV-SALARY-ARRAY,
:HV-BONUS-ARRAY)
FOR :HV-NUM-ROWS
ATOMIC

all array elements will have a 100 occur clause

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the uses of db2 optimizer?

1228


What are union and union all?

920


What is the difference between spufi and qmf?

1053


How to run db2 command in windows?

1141


Explain package in db2 and its advantages?

1138


How will you return the number of records in table?

882


What is the cobol picture clause of the db2 data types date, time, timestamp?

1012


what are bind concepts in db2 cobol?

1036


How can you find out the # of rows updated after an update statement?

1053


What is the difference between dbm cfg and db cfg file in db2 ?

1481


List out the buffer pools in db2

1023


Which are the db2 tools to protect integrity of the database?

1073


Why do we use cursor?

1051


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2781


what is the role of the cursor in db2?

1002