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 is dbrm? What it contains?
What is db2 bind process?
Discuss about db2 bind?
What does reorg do in db2?
How to fetch the last row from the table in SQL (db2)?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
How to resolve deadlock issue
Where can you declare a cursor in a cobol-db2 program?
Explain the benefits you can get from mainframe connect?
Can we insert update delete in view?
How many databases are there?
How does a cursor work?
How to restart a DB2 program?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?
What is deadlock in db2?