(C) LIBRARY BUFFER (D) LARGE POOL
(E) REDO LOG BUFFER 26
假定表A中有十万条记录,要删除表中的所有数据,但仍要保留表的结构,请问用以下哪个命令效率最高( )D (A) delete from a; (B) drop table a; (C) trunc table a; (D) truncate table a; (E) 以上所述都不正确 27
若想要修改一个表的结构,应该用以下哪个命令( )A (A) ALTER TABLE (B) DEFINE TABLE (C) MODIFY TABLE (D) REBUILD TABLE (E) REVISE TABLE 28
以下对于事务的叙述,比较全面的是( )E
(A) 事务中的操作是一个整体,要成功都成功,要失败都失败 (B) 事务可以把所操作的数据库由一个状态转变到另一个状态 (C) 事务在提交之前,其它事务看不到它对数据库的影响 (D) 事务提交后,其结果将在数据库中得以体现 (E) 以上所述都是正确的 29
ORACLE9i数据库服务器不能在下列哪个OS平台上安装运行( )C (A) WindowsNT (B) Windows2000 (C) Windows98 (D) SCO UNIX
(E) Redhat Linux 30
列出EMP表中,从事每个工种(JOB)的员工人数( )D (A) select job from emp;
(B) select job,count(*) from emp;
(C) select distinct job,count(*) from emp; (D) select job,count(*) from emp group by job; (E) select job,sum(empno) from emp group by job;
31
列出JONES的所有下属员工,但不包括JONES本人( )B
(A) select ename from emp connect by prior empno=mgr start with ename='JONES';
(B) select ename from emp where ename<>'JONES' connect by prior empno=mgr start with ename='JONES';
(C) select ename from emp where ename='JONES' connect by prior empno=mgr start with ename='JONES';
(D) select ename from emp where ename='JONES' connect by prior empno=mgr start with ename<>'JONES'; 32
列出KING(公司总裁)的所有下属之间的层次关系, 但不要显示出JONES及其所有下属( )A
(A) select level,ename,empno,mgr from emp connect by prior empno=mgr and ename<>'JONES' start with ename ='KING'
(B) select level,ename,empno,mgr from emp connect by prior empno=mgr and ename='JONES' start with ename ='KING'
(C) select level,ename,empno,mgr from emp connect by prior empno=mgr and ename<>'JONES' start with ename <>'KING'
(D) select level,ename,empno,mgr from emp connect by prior empno=mgr and ename='JONES' start with ename <>'KING' 33
求emp表中销售人员的最高和最低工资( )C (A) select max(sal),min(sal) from emp;
(B) select deptno,max(sal),min(sal) from emp group by deptno;
(C) select max(sal),min(sal) from emp where job='SALES';
(D) select deptno,max(sal),min(sal) from emp where job='SALES' group by job;
34
求最高工资大于10000的部门( )B
(A) select deptno,min(sal) from emp group by deptno having count min(sal)<1000; (B) select deptno,min(sal) from emp group by deptno having count max(sal)>1000; (C) select deptno,min(sal) from emp group by deptno having count max(sal)<1000; (D) select deptno,min(sal) from emp group by deptno having count min(sal)>1000; 35
怎样取出在集合A中,但却不在集合B中的数据( )A (A) A MIUS B (B) B MINUS A (C) A INTERSECT B (D) B INTERSECT A 36
怎样取出在集合A中,又在集合B中的数据( )C (A) A UNION B (B) A UNION ALL B (C) A INTERSECT B (D) A MIUS B 37
列出每个员工及其直属领导的的名字( )B (A) SELECT ENAME FROM EMP b, EMP a WHERE b.MGR=a.EMPNO; (B) SELECT b.ENAME, a.ENAME FROM EMP b, EMP a WHERE b.MGR=a.EMPNO; (C) SELECT b.ENAME, a.ENAME FROM EMP b, EMP a
WHERE b.MGR IN a.EMPNO; (D) SELECT b.ENAME, a.ENAME FROM EMP b, EMP a
WHERE b.MGR BETWEEN a.EMPNO; 38
列出所有部门的职工人数(包括没有职工的部门) ( )B
(A) select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno=dept.deptno group by dept.deptno,dname;
(B) select dept.deptno,dname,count(emp.empno) from emp,dept where emp.deptno(+)=dept.deptno group 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; 39
列出没有职工的部门( )A
(A) select dept.deptno from emp,dept where emp.deptno(+)=dept.deptno and emp.deptno is null;
(B) select dept.deptno from emp,dept where emp.deptno(+)=dept.deptno and dept.deptno is null;
(C) select dept.deptno from emp,dept where emp.deptno(+)=dept.deptno and emp.deptno=null;
(D) select dept.deptno from emp,dept where emp.deptno=dept.deptno(+) and dept.deptno is null; 40
查找出SCOTT所在部门的所有职工( )D
(A) select count(*) from emp where deptno= (select deptno from emp where ename='SCOTT'); (B) select sum(*) from emp where deptno= (select deptno from emp where ename='SCOTT'); (C) select * from emp where empno= (select empno from emp where ename='SCOTT'); (D) select * from emp where deptno= (select deptno from emp where ename='SCOTT'); 41
查询EMP表中的数据并且显示出行号(从1开始) ( )C (A) select rowid,a.* from emp a; (B) select level,a.* from emp a; (C) select rownum,a.* from emp a;
(D) select sequence,a.* from emp a; 42
查询出当前的数据库系统时间,精确到秒( )B
(A) select to_date(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual; (B) select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual; (C) select date(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual; (D) select chr(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual; 43
查询出所有名字以'S'开始的员工( )C
(A) select * from emp where ename in 'S%'; (B) select * from emp where ename='S%';
(C) select * from emp where ename like 'S%'; (D) select * from emp where ename like 'S_'; 44
取出工资在2000到3000元(包括上下限)之间的员工( )D (A) select * from emp wher sal in (2000,3000); (B) select * from emp wher sal like (2000,3000); (C) select * from emp wher sal = (2000,3000);
(D) select * from emp wher sal between 2000 and 3000; 45
查询出EMP表中COMM字段为空的记录( )D (A) select * from emp where comm=''; (B) select * from emp where comm=null; (C) select * from emp where nvl(comm)=0; (D) select * from emp where comm is null; (E) select * from emp where nvl(comm,0)=0; 46
查询出EMP表中1982年及以后入职的员工信息(注:字段hiredate为入职日期,数据类型为DATE型) D
(A) select * from emp where hiredate>='19820101';
(B) select * from emp where hiredate>=to_char('19820101','YYYYMMDD'); (C) select * from emp where to_date(hiredate,'YYYYMMDD')>='19820101'; (D) select * from emp where to_char(hiredate,'YYYYMMDD')>='19820101'; 47
如何显示今天是星期几(周一到周日,分别用1~7表示) ( )D (A) select to_char(sysdate,'D') from dual; (B) select to_char(sysdate,'W') from dual;