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?



Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you count the number of rows from a table tab?

637


What type of database is db2?

524


What are the various data types available in db2?

634


Which component is responsible for db2 startup and shutdown?

630


How to fetch the last row from the table in SQL (db2)?

1037






What is ibm db2 client?

523


How do we specify index to include or not during bind process.

1674


What is schema in db2?

576


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

630


What is dbrm in db2 database?

591


what is utility for parm lib

1879


How do I delete a table in database?

599


How does a cursor work?

558


What is data manager?

610


What kind of database is db2?

572