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
What are the uses of db2 optimizer?
What are union and union all?
What is the difference between spufi and qmf?
How to run db2 command in windows?
Explain package in db2 and its advantages?
How will you return the number of records in table?
What is the cobol picture clause of the db2 data types date, time, timestamp?
what are bind concepts in db2 cobol?
How can you find out the # of rows updated after an update statement?
What is the difference between dbm cfg and db cfg file in db2 ?
List out the buffer pools in db2
Which are the db2 tools to protect integrity of the database?
Why do we use cursor?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
what is the role of the cursor in db2?