MSS:
--from和where放到一起
update ROBXDJ set ROBXDJ_IFYX=ROBXLX_YX from ROBXLX
where ROBXLX_NM=ROBXDJ_BXLX and ROBXDJ_IFYX is null or ROBXDJ_IFYX =''
--使用子查询
update ROBXDJ set ROBXDJ_IFYX= (select ROBXLX_YX from ROBXLX where ROBXLX_NM=ROBXDJ_BXLX)
where ROBXDJ_IFYX is null or ROBXDJ_IFYX =''
ORA:
--使用子查询,只能这样
update ROBXDJ set ROBXDJ_IFYX= (select ROBXLX_YX from ROBXLX where ROBXLX_NM=ROBXDJ_BXLX )
where ROBXDJ_IFYX is null or ROBXDJ_IFYX =''
update ROFYFT A
set ROFTFT_XM02= (select ROFYXM_ZJM from ROFYXM where A.ROFYFT_FYXM = ROFYXM_NM )
where ROFTFT_XM02 is null and ROFYFT_DWBH = 'Z01090090350040000'
and ROFYFT_BXNM in
(select ROBXDJ_NM from ROBXDJ where ROBXDJ_NM = ROFYFT_BXNM
and ROBXDJ_RQ < to_date('2016/4/30 15:49:34' ,'yyyy-mm-dd hh24:mi:ss') )