union 会删除重复数据
union
union all 不会删除重复数据
union all
select * from ( select *,'a' as kind from tablea where name is not null union all select *, 'b' as kind from tableb where name = 'b-data' ) a
MySQL UNION 操作符