-- 求emp表ename中含’A‘或含有‘M’
UNION all
使用如下语句进行替换呢
select * from emp where ename like'%A%' or ename like '%M%';
--交集
select * from emp where ename like '%A%'
intersect
select * from emp where ename like '%M%';
--使用如下语句替代呢
select * from emp where ename like '%A%' and ename like '%M%';
minus
select deptno from emp;
--可以使用如下语句进行替换
select deptno from dept where deptno not in
(select distinct deptno from emp where deptno is not null);
文章来源: https://blog.csdn.net/HanYueQian/article/details/96561191