I've read that one way to avoid ORA-01407 error like in this example ( [DBA-ORACLE.COM SITE|http://www.dba-oracle.com/t_ora_01407_cannot_update_string_to_null.htm] ) is to use additional EXISTS in where condition:
update ORDERS ord
set ord.amount = ( select ord.qty * it.item_price
from ITEM it
where ord.item_id = it.item_id )
where exists ( select 1
from ITEM it
where ord.item_id = it.item_id );
Execution plan confirms that those similar correlated subqueries are evaluated twice when I substitute 1 with select ord.qty * it.item_price to make them identical. what will happen if between those two evaluations for particular item_id if some commited update/delete happens on ITEM table causing row removal/values change for item_id? How will it influence the UPDATe? will there be any errors etc?
thank you