Oracle(第六章 子查詢)

having子句應用子查詢 例如:顯示部門內最低工資比20部門最低工資要高的部門的部門編號及部門內的最低工資 第一步:查詢每一個部門的最低工資 select deptno,min(sal) from emp group by deptno; 第二步:20部門的最低工資是多少? select min(sal) from emp where deptno=20; 第三步:查詢哪些部門最低工資比800(
相關文章
相關標籤/搜索