1、union操作符用于连接两个以上的select语句的结果组合到一个结果集合中。多个select语句会删除重复的数据。

2、在使用时union合并结果集时,要求两个结果集的列数相同。

实例

select playerno, town
from PLAYERS
where town = 'Inglewood'
union
select playerno, town
from PLAYERS
where town = 'Plymouth';
登录后复制

以上就是mysql使用union的注意点是什么的详细内容,更多请关注Work网其它相关文章!

09-19 07:40