Having语句

是对聚合函数的筛选,如:countmaxminavgsum。一般在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 返回前五行

相关文章:

  • 2021-07-19
  • 2021-09-28
  • 2021-08-26
  • 2021-12-05
  • 2021-11-11
  • 2021-05-06
  • 2021-06-16
  • 2021-08-28
猜你喜欢
  • 2021-06-20
  • 2021-07-24
  • 2021-09-01
  • 2021-09-02
  • 2021-06-23
  • 2022-01-02
相关资源
相似解决方案