使用sql语句进行更新
update t1 set t1.s1=t2.s2 from t1,t2 where t1.s3=t2.s3
提示sql语句没有正确结束 ora-000933: sql command not properly
ended
是什么原因
改用:
update aa03 set (c02)=(select nvl(sum(b03),0) from aa02 where aa02.a01=aa03.a01 and aa02.c01=aa03.c01);
结果aa03表中的 c02字段 值凡是跟aa02交集的都改过来了,交集外的全改为0了
请求指点。