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

What is meant by index cardinality?

2 Answers  


What is role in db2?

0 Answers  


how to get duplicate records from tables?write qurey for this?

4 Answers   ANZ,


Is schema the same as database?

0 Answers  


What is a collection in db2?

0 Answers  






have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

0 Answers  


Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion?

2 Answers   Verizon,


How can you find out the # of rows updated after an update statement?

0 Answers  


Write a query to extract first 5 characters of a name in the column Stud_Name?

1 Answers   RBS,


SI Stud name Subject Marks Pass/Fail 1 Sham Maths 40 P 1 Sham Physics 50 P 1 Sham Bio 20 F 2 Ram Maths 40 P 2 Ram Physics 50 P 2 Ram Bio 60 P For the above data , write the SQL query for the student who passed in all the subjects . For eg : I want the data of only Ram coz he passed all subjects .

2 Answers   Cognizant,


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

0 Answers  


what is the soft code for deadlock ?

2 Answers   Logica CMG,


Categories