try:update T_CJ_ZZSJCJ a set (SL0,SL)=( select SL0,SL from T_JK_CL_CJ_ZZSJCJ where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs) where exists ( select 1 from T_JK_CL_CJ_ZZSJCJ where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs);
用这句看能不能提高一些速度! update T_CJ_ZZSJCJ a set (SL0,SL)=( select SL0,SL from T_JK_CL_CJ_ZZSJCJ where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs) where exist ( select 'X' from T_JK_CL_CJ_ZZSJCJ b where a.CJRQ=b.CJRQ and a.LB=b.LB ,.....)
select SL0,SL from T_JK_CL_CJ_ZZSJCJ
where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and
SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs)
where exists (
select 1 from T_JK_CL_CJ_ZZSJCJ
where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and
SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs);
update T_CJ_ZZSJCJ a set (SL0,SL)=(
select SL0,SL from T_JK_CL_CJ_ZZSJCJ
where CJRQ=a.CJRQ and LB=a.LB and DW=a.DW and SJLB=a.SJLB and RCBJ=a.RCBJ and
SJBM=a.SJBM and BZLX=a.BZLX and DW2=a.dw2 and YSFS=a.ysfs)
where exist
(
select 'X' from T_JK_CL_CJ_ZZSJCJ b where a.CJRQ=b.CJRQ and a.LB=b.LB ,.....)