8、标量子查询:select * from emp
where sal>(select avg(sal) from emp);
9、行子查询:select empno, ename,job,deptno
from emp
where (deptno,job)=(select deptno,
job from emp where ename='smith' )
and ename<>'smith';
10、子查询操作符:
not in() 在/不在其中
any 满足其中任意一个
all 都满足
11、列子查询:select * from
emp left join saligrade
on sal between lasal and hisal
where yuangongid not in (select
lingdao id from where is not null) ;
12、any操作符(任意一个): select * from emp where sal >any(select sal from emp where deptno=30) and deptno<>30;
13、all操作符: select * from emp where sal >
all(select sal from emp where deptno=30);
在第一节基础上 更新了函数和执行顺序:实操了字符数函数、时间函数、字段截取函数、interval函数等,除最后顺序实操因未导入数据库,导致无法执行