Oracle 拾遗(一)

it2022-05-09  30

Oracle 拾遗(一)

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 返回前五行

posted on 2010-11-07 09:45 Johnny_Z 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/Johnny_Z/archive/2010/11/07/1870951.html

相关资源:数据结构—成绩单生成器

最新回复(0)