直接执行则会报错ORA-01407如下:
SQL> update t_rm_subversioninfo a
  2  set a.verid=(select t.pro_id from t_hwz t where t.pro_name=a.projectname )
  3  ;
 
update t_rm_subversioninfo a
set a.verid=(select t.pro_id from t_hwz t where t.pro_name=a.projectname )
 
ORA-01407: 无法更新 ("CCRM"."T_RM_SUBVERSIONINFO"."VERID") 为 NULL但是已经确认了这样关联查询出来的结果是没有空值的:select t.pro_id from t_rm_subversioninfo a,
t_hwz t where t.pro_name=a.projectname将两张表在where后面做了exists关联,问题是解决了,可是为什么会这样,还是搞不清楚,麻烦大神们明示,多谢!
SQL> 
SQL> update t_rm_subversioninfo a
  2  set a.verid=(select t.pro_id from t_hwz t where t.pro_name=a.projectname )
  3  where exists (select 1 from t_hwz t where t.pro_name=a.projectname);
 
34 rows updated
 
SQL> update ORA-01407空值