MYSQL基础----合并查询结果(UNION)
『1』UNION 合并并去重
employee表
department表
SELECT * FROM employee
UNION
SELECT * FROM department;
『2』UNION ALL合并不去重
SELECT * FROM employee
UNION ALL
SELECT * FROM department;
『1』UNION 合并并去重
employee表
department表
SELECT * FROM employee
UNION
SELECT * FROM department;
『2』UNION ALL合并不去重
SELECT * FROM employee
UNION ALL
SELECT * FROM department;