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

Answer Posted / shekhar

insert into table1
select * from table2
where cond

this query will insert multiple rows at once.

there is load utility of DB2 can help in inserting bulk data from data file.

Plz correct me if i m wrong.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is runstats db2?

585


What is cascading rollback?

624


What is lock escalation in db2?

574


Which is faster delete or truncate?

681


How do I delete a table in database?

599






What is the picture clause of null indicator variable?

693


What is the use of reorg in db2?

608


Define db2 and its databases?

622


What is the difference between oracle and db2?

587


My sql statement select avg(salary) from emp yields inaccurate results. Why?

643


What is db2 bind process?

759


What kind of database is db2?

572


What is the use of commit in db2?

636


What are the uses of db2 optimizer?

819


What is a collection in db2?

584