四.having子句
1.语法:
select 查询内容
from 表名
[where 条件]
[group by 分组字段]
[having 条件]
[order by 字段名asc|desc]
select from --->where过滤--->group by --->having过滤
-- 1.列如: 每个部门不同岗位人数,且人数大于2
select count(*) from emp where count(*)>2 group by deptno,job
四.having子句
1.语法:
select 查询内容
from 表名
[where 条件]
[group by 分组字段]
[having 条件]
[order by 字段名asc|desc]
select from --->where过滤--->group by --->having过滤
-- 1.列如: 每个部门不同岗位人数,且人数大于2
select count(*) from emp where count(*)>2 group by deptno,job