例:
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);
在第一节基础上 更新了函数和执行顺序:实操了字符数函数、时间函数、字段截取函数、interval函数等,除最后顺序实操因未导入数据库,导致无法执行