sql server union与unionALL区别

两种用法 一样, 查询字段类型需要一致

union 会自动去重

union all  不会去重

select  name ,age from student

union

select  name ,age from student2


原文地址:https://www.cnblogs.com/zhangmm96/p/11133267.html