题目内容

在同样的条件下,下面的哪个操作得到的结果集有可能最多?( )

A. 内连接
B. 左外连接
C. 右外连接
D. 完全外连接

查看答案
更多问题

列出薪水高于所在部门平均工资的员工信息( )。

A. select deptno,ename,sal from emp a where sal>(select avg(a.sal) from emp where deptno=a.deptno);
B. select deptno,ename,sal from emp a where sal>(select avg(sal) from emp where deptno=a.deptno);
C. select a.deptno,a.ename,a.sal from emp a,emp b where a.deptno=b.deptno and a.sal>avg(b.sal);
D. select a.deptno,a.ename,a.sal from emp a,emp b where a.deptno=b.deptno and b.sal>avg(a.sal);

列出没有职工的部门( )。

A. select dept.deptno from emp,deptwhere emp.deptno(+)=dept.deptnoand emp.deptno is null;
B. select dept.deptno from emp,deptwhere emp.deptno(+)=dept.deptnoand dept.deptno is null;
C. select dept.deptno from emp,deptwhere emp.deptno(+)=dept.deptnoand emp.deptno=null;
D. select dept.deptno from emp,deptwhere emp.deptno=dept.deptno(+)and dept.deptno is null;

列出所有部门的职工人数(包括没有职工的部门) ( )。

A. select dept.deptno,dname,count(emp.empno)from emp,dept where emp.deptno=dept.deptnogroup by dept.deptno,dname;
B. select dept.deptno,dname,count(emp.empno)from emp,dept where emp.deptno(+)=dept.deptnogroup by dept.deptno,dname;
C. select dept.deptno,dname,count(emp.empno)from emp,dept where emp.deptno=dept.deptno(+)group by dept.deptno,dname;
D. select dept.deptno,dname,count(emp.empno)from emp,dept where emp.deptno(+)=dept.deptno(+)group by dept.deptno,dname;

列出KING(公司总裁)的所有下属之间的层次关系,但不要显示出JONES及其所有下属( )。

A. select level,ename,empno,mgr from empconnect by prior empno=mgrand ename<>'JONES'start with ename ='KING'
B. select level,ename,empno,mgr from empconnect by prior empno=mgrand ename='JONES'start with ename ='KING'
C. select level,ename,empno,mgr from empconnect by prior empno=mgrand ename<>'JONES'start with ename <>'KING'
D. select level,ename,empno,mgr from empconnect by prior empno=mgrand ename='JONES'start with ename <>'KING'

答案查题题库