MySQL union、union all

发布于 2020-08-11 / MySQL / 0条评论 / 161浏览

x01

Query:

select 1,3 union select 1,3

Result:

1, 3

x02

Query:

select 1,3 union all select 1,3

Result:

1, 3
1, 3

总结

union会合并去重, union all不会去重。

评论
站长统计