联合 union

联合(union):

  作用是连接多个查询语句并查询,然后去除重复值。

select id from department

union

select id from person;

union all 是显示所有的值,包括重复值

原文地址:https://www.cnblogs.com/dontgiveup/p/9373322.html