except 和 intersect 的用法

--查询排除 factory = 'A' 的结果集
select * from production where department = '1组'
except
select * from production where factory = 'A'

--查询排除 factory = 'A' and department = '1组' 的结果集
select * from production where department = '1组'
intersect
select * from production where factory = 'A'
 
原文地址:https://www.cnblogs.com/LittleBai/p/13558348.html