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

What is an inner join, and an outer join ?

1 Answers   CTA,


I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

0 Answers  


What happens to the PLAN if index used by it is dropped?

1 Answers  


How to resolve -803 sql code in DB2?

3 Answers   Cap Gemini,


how to resolve -805 . how to see dbrm and package not found

2 Answers   IBM,






Where besides the DB2 catalog is database object information stored by DB2?

1 Answers  


If we keep the DCLGEN structure for a table in a copybook and include it in the COBOL program using the COPY statement, will there be any impact during compilation or at any stage of program execution?

2 Answers  


Usually, which is more important for DB2 system performance - CPU processing or I/O access?

1 Answers  


what's the error code for Unique Index Violation?

2 Answers  


What is explain plan in db2?

0 Answers  


What is a DB2 access path?

1 Answers  


My DB2 program first read the data from a file and then it look into a table with the data it got from the file.If we did not bind the program , should the file read before SQL execution be success??

2 Answers   Xansa,


Categories