mysql 中将多个select语句的查询结果合并一起的方法
2023-01-03 本文已影响0人
Rinaloving
1. 方法
- 结果去重
(select * from table1) union (select * from table2)
- 结果不去重
(select * from table1) union all (select * from table2)
(select * from table1) union (select * from table2)
(select * from table1) union all (select * from table2)