列出薪水高于所在部门平均工资的员工信息()
A: selectdeptno,ename,salfromempawheresal>(selectavg(a.sal)fromempwheredeptno=a.deptno);
B: selectdeptno,ename,salfromempawheresal>(selectavg(sal)fromempwheredeptno=a.deptno);
C: selecta.deptno,a.ename,a.salfromempa,empbwherea.deptno=b.deptnoanda.sal>avg(b.sal);
D: selecta.deptno,a.ename,a.salfromempa,empbwherea.deptno=b.deptnoandb.sal>avg(a.sal);
A: selectdeptno,ename,salfromempawheresal>(selectavg(a.sal)fromempwheredeptno=a.deptno);
B: selectdeptno,ename,salfromempawheresal>(selectavg(sal)fromempwheredeptno=a.deptno);
C: selecta.deptno,a.ename,a.salfromempa,empbwherea.deptno=b.deptnoanda.sal>avg(b.sal);
D: selecta.deptno,a.ename,a.salfromempa,empbwherea.deptno=b.deptnoandb.sal>avg(a.sal);
举一反三
- 查询部门20的员工数量,每个月的工资总和及平均工资( ) A: SELECT sum(nvl(sal,0)),avg(nvl(sal,0)) from emp B: SELECT ename,sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno C: SELECT ename,count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno D: SELECT count(empno),sum(nvl(sal,0)),avg(nvl(sal,0)) from emp where deptno =20 group by deptno
- 以下语句不正确的是( ) A: select * from emp B: select ename,hiredate,sal from emp C: select * from emp order deptno D: select * from where deptno=1 and sal<300
- 智慧职教: 表结构如下:dept(deptno,dname),emp(empno,ename,job,hiredate,sal,deptno)。创建视图查询系部名称、教师姓名,职位,工资信息。
- 以下语句不正确的是( ) A: select * from emp; B: select ename,hiredate,sal from emp; C: select * from emp order deptno; D: select * from where deptno=1
- 现有关系模式: EMP(empno,ename,mgr,sal,workday) 以及DEPT(deptno,dname,loc) ,以下视图中不可能更新的为________