(1)union
可以将多个select语句的结果合并为一个,合并后会删除重复的数据
select phone from user union select tel from order --没有重复数据
(2)union all
可以将多个select语句的结果合并为一个,合并后不会删除重复的数据
select phone from user union all select tel from order --可以有重复数据
(1)union
可以将多个select语句的结果合并为一个,合并后会删除重复的数据
select phone from user union select tel from order --没有重复数据
(2)union all
可以将多个select语句的结果合并为一个,合并后不会删除重复的数据
select phone from user union all select tel from order --可以有重复数据