How to update more then one record using update?

Answers were Sorted based on User's Feedback



How to update more then one record using update?..

Answer / pratap singh

For this concern you can use or oprator along with where
clause, Example

WHERE DEPT_ID='D110' OR 'D001' OR 'D105'

Is This Answer Correct ?    7 Yes 0 No

How to update more then one record using update?..

Answer / sivakumar sekharannair

update query without "where" command will update multiple
rows in the table;

Is This Answer Correct ?    2 Yes 1 No

How to update more then one record using update?..

Answer / k

Don't give where command in update query

Is This Answer Correct ?    1 Yes 1 No

How to update more then one record using update?..

Answer / selvam a

Update a table using a symbolic cursor:
UPDATE WHERE CURRENT OF limits the scope of DB2 updates to
one row at a time, specifically the row your cursor is
positioned on.

Is This Answer Correct ?    0 Yes 0 No

How to update more then one record using update?..

Answer / 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

More DB2 Interview Questions

Could anyone clearly explain the diference between sub query and correlated sub query?

3 Answers  


What is catalog database in db2?

0 Answers  


What are the various data types available in db2?

0 Answers  


For update of a row in cursors, when do we move value into host variable in cobol progrm? is it before open or before fetch ?

2 Answers   iGate,


What is the use of DELGEN in DB2? Can we Write the program with out using it?

6 Answers   Cap Gemini,






when we are trying to update db2 rows. if the program abends . how we will know that the last successful update row was

5 Answers   IBM,


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

0 Answers  


What are db2 objects?

0 Answers  


What is the role of union all and union

0 Answers  


Can we use select * statement in cobol program without giving field names ???

3 Answers   Zensar,


Can a array declared with an index be displayed(readable format) in spool?

4 Answers   Syntel, UST,


How to resolve SQL Code -310. The db table feild is declared as Decimal(7,2).

2 Answers   IBM, Infosys,


Categories