Subject update problem
Author Ben Johnson

I have a product table which contains around 15000 records
and a new_product table which contains around 1000 records.
All the product id which contains in new_product table
exists in product table also.

When I tried to update product name in product table using
the UPDATE statment given below, it is trying to update all
the records in the product table that doesnt have an id
in new_product. So it resulted in null replacement in the
product name and the UPDATE statment gets aborted since null
value is not allowed in product name.

UPDATE product P SET product_nm = (select product_nm
FROM new_product NP where = ;

Is the above SQL statment correct? I just want to replace
the product name in the product table with the name from
the new_product table.

There is always a better job for you at
Go now