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 contents of a dclmgen?
How do I delete a column in db2?
What is meant by dclgen?
What is the difference between oracle and db2?
what is db2 restart?
What is host variable in db2 cobol?
What types of tables are there in the db2 database?
Is db2 a programming language?
Define sqlca.
Explain correlated sub-queries.
What is ibm db2 database?
What is commit in db2?
What is the usage of open cursor command?
How can you do the explain of a dynamic sql statement?
What is cursor stability in db2?