oracle學習摘要2

多列子查詢: select * from emp where (deptno,job)=(select deptno,job from emp where ename=’smith’);注意:列的順序要對應。 查詢高於自己部門平均工資的人: 1->查出各個部門的平均工資和部門編號: select deptno, avg(sal)  mysal from emp group by deptno; 2
相關文章
相關標籤/搜索