Skip to main content

联合查询

-union,union all
select 字段列表 from 表A……
union [all]
select 字段列表 from 表B……;
# 联合查询
select * from emp where salary < 5000
union all # 有all可能重复,去掉all后
select * from emp where age > 50;