How to update more then one record using update?

Answer Posted / guna

UPDATE table1 set columnname = (SELECT columnname from
table2 where some condition)

You can also use EXISTS instead of '=' for updating

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain packages.

654


Define db2 and its databases?

616


What is a db2 table?

593


What is the usage of open cursor command?

597


How would you find out the total number of rows in a db2 table?

572






What parameters are used to control the free space in DB2?

640


What types of tables are there in the db2 database?

547


B37 abend during spufi?

978


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

619


How can we retrieve the total number of records in RPG & CLLE?

189


what is utility for parm lib

1868


What is a buffer in memory?

590


What is a page in db2?

603


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

1646


What is the syntax for FETCH in DB2 ?

666