@ having절은 group by 와 함께 사용되어 select 문장에서 집계 함수를 사용한 조건을 명시하는 절이다.

@ having절은 항상 group by와 함께 사용되어야 한다.


select empno , count(empno) from scmsusert
where empno is not null
group by empno
having count(empno)>1
select department_id,count(*) from employees
where department_id is not null
group by department_id
having department_id>30

Posted by Taoist
,