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
Mention some fields that are a part of sqlca.
before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?
What is node in db2?
What is the max length of sqlca?
What is the physical storage length of the data types date, time, and timestamp?
What is the physical storage length of date data type?
Which component is used to execute the sql statements?
What is cobol db2?
What is the information associated with sysibm.syslinks table?
How do I change the column size in db2?
Mention the different locking levels that are available in db2.
What is the difference between drop table and delete table?
How do I add a column in db2?
Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference
What is lock escalation in db2?