update t1 a set
a.c3= (select a.c2+nvl(b.c5,0) from t2 b where a.c1=b.c1(+));
select a.c2+nvl(b.c5,0) from t2 b where a.c1=b.c1(+) 这个语句选出来的应该就不是空值阿。
当然,如果正常只select ,因该写成,select a.c2+nvl(b.c5,0) from t1 a, t2 b where a.c1=b.c1(+)
这个select的时候就是正确的。
update语句加where条件,限定需要更新的记录数:
update t1 a set
a.c3= (select a.c2+nvl(b.c5,0) from t2 b where a.c1=b.c1(+));
where exists (select 'x' from t2 where t2.c1 = a.c1)
/