1.UNION与UNION ALL的区别
UNION去重且排序
UNION ALL不去重不排序
2.sql语句or与union all的执行效率比较:union all>union> in >or
用一张表更新另一张表:
UPDATE ASET A1 = B1, A2 = B2, A3 = B3FROM A LEFT JOIN B ON A.ID = B.IDMS SQL SERVER的写法: UPDATE ASET A1 = B1, A2 = B2, A3 = B3FROM A, B WHERE A.ID = B.ID