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
相关文章
相关标签/搜索