MERGE INTO tb_st_shxxcount tt USING ( SELECT DISTINCT sd.CODE, COUNT (ts.LRDW) count1, TO_CHAR (ts.LRSJ, 'yyyy-MM-DD') YFDATE FROM TB_RY_BSINFO ts, SYS_DICTITEM sd WHERE sd.CODE = ts.LRDW(+) AND sd.groupid = 'CODE_UNIT' AND ts.lrsj IS NOT NULL GROUP BY sd.CODE, TO_CHAR (ts.LRSJ, 'yyyy-MM-DD')) TP ON (TT.CJDWDM = TP.CODE AND TO_CHAR (TT.UPDATETIME, 'YYYY-MM-DD') = TP.YFDATE) WHEN MATCHED THEN UPDATE SET TT.BSINFOCOUNT = TP.COUNT1
非循环更新某一个表的字段