例:
1.[not] in
查询员工数不少于5人的部门所有员工,显示empno,ename,sal,grade
select *from emp
where deptno in(select deptno from emp group by deptno having count(*)>=5);
2.ANY
查询基本工资高于30号部门任意员工的其他部门员工信息
select * from emp
where sal>any(select sal from emp where deptno=30) and deptno<>30;
3.ALL
查询基本工资高于30号部门所有员工的员工信息
select * from emp
where sal>all(select sal from emp where deptno=30);