;
6.9.5.1 查询列值为空的情况(is null)
案例:查询emp表中,奖金(comm)为空的,员工的编号,姓名,奖金
select empno,ename,comm
from emp
where...is null;
6.9.5.2 查询列值不为空的情况(is not null)
案例:查询emp表中,奖金不为空的,员工的编号,姓名,职位,工资,奖金,根据工资升序排列
select empno,ename...comm is null - 列值不为空 mgr is not null - between...and和and相似
select */列名 from 表名 where 列名 between 初值...select deptno,sum(sal),avg(sal)
from emp
where sal>1000
group by deptno;
练习:查询emp表中,领导编号不为空的,每个部门的编号...0个或者多个任意字符
_: 1个任意字符
处理空值的函数
nvl(列名,数值) 如果列值为null,使用数值代替null
聚合函数
count(列名/*)
*:表示统计表中数据总数量
列名:列值不为空的