Having语句
是对聚合函数的筛选,如:count,max,min,avg,sum。一般在group by语句中使用。
例如:
select deptno, job, avg(sal)
from emp
where hiredate >= to_date('1981-05-01','yyyy-mm-dd')
group by deptno,job
having avg(sal) > 1200
Rownum行号
select * from emp where rownum<=5 order by sal desc 返回前五行