union与union all的区别

UNION去重且排序
UNION ALL不去重不排序
因此,union all的效率要高很多,在无需去重的情况下,请使用union all

你可能感兴趣的:(union与union all的区别)