merge into (SELECT * FROM QUERY_DB1.test_MPOS ) T1 using (SELECT FLAG FLAG1,IN_MNO FROM QUERY_DB1.test_MPOS_0319 ) T2 ON (T1.IN_MNO=T2.IN_MNO) WHEN MATCHED THEN UPDATE SET T1.FLAG=T2.FLAG1 where T2.FLAG != 'D' ;
---数据量超过50W,可以参考。