Suppose we have a query for update

update table1
set col1 = 'val1'
where col2=(select .... from ...)

suppose the subquery does not return any record, what will
happen to update?





Suppose we have a query for update update table1 set col1 = 'val1' where col2=(select..

Answer / santosh kumar d

If the col2 field having any null value then that value to
be updated.
If col2 doesn't have any null value then record remains same
nothing will be updated.

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More DB2 Interview Questions

how to delete perticular row from table for ex. how you will delete 3rd row from table please answer THANKS IN ADVANCE

10 Answers   IBM,


What is a synonym ?

2 Answers  


what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?

3 Answers   Cap Gemini, Tech Mahindra,


how can you access index

4 Answers   IBM, Tech Mahindra,


if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)

3 Answers  






File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

0 Answers   Infosys,


What is normalization and what are the five normal forms?

1 Answers  


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

3 Answers  


What is the database descriptor?

2 Answers  


Why might full image copies be faster to implement than an incremental image copy?

4 Answers  


What is a PLAN table? How will you use it? Give the various fields of PLAN table?

1 Answers   Accenture,


how to fetch first 100 rows in db2

2 Answers   IBM,


Categories