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

Answer Posted / siri

insert into tableName
(col1, col2, col3, col4, col5)
values
(val1, val2, val3, val4, val5),
(val1, val2, val3, val4, val5),
(val1, val2, val3, val4, val5),
(val1, val2, val3, val4, val5);

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between cs and rr isolation levels? Where do you specify them?

589


What is dbrm? What it contains? When it will be created?

595


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

3798


What is the use of commit in db2?

638


Explain correlated sub-queries.

589






What are db2 tables?

652


What is commit in db2?

597


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?

7534


can we view the access paths created by dbrm ? how ? thx

6265


Why do we bind in db2?

634


How do you find the maximum value in a column in db2?

652


How to find the maximum value in a column in the db2 database?

617


What is host variable?

599


Is it possible to create an Instance in DB2 using DB2 Control Center ?

632


What is host variable in db2 cobol?

610