12
返回列表 发新帖
楼主: 悟不空

向高手请教一道 007 TESTKING 试题的正确答案!!!!

[复制链接]
论坛徽章:
50
2015年新春福章
日期:2015-03-06 11:57:31复活蛋
日期:2011-07-26 15:00:15蜘蛛蛋
日期:2011-06-22 16:25:38双黄蛋
日期:2011-06-17 09:28:35鲜花蛋
日期:2011-05-24 10:57:112010广州亚运会纪念徽章:武术
日期:2011-05-09 16:03:252010广州亚运会纪念徽章:橄榄球
日期:2011-05-03 15:43:102010广州亚运会纪念徽章:高尔夫球
日期:2011-04-20 22:04:572010广州亚运会纪念徽章:武术
日期:2011-04-09 20:29:292011新春纪念徽章
日期:2011-02-18 11:42:47
11#
发表于 2005-2-9 10:14 | 只看该作者
我觉得E是对的

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
12#
发表于 2005-2-9 10:30 | 只看该作者
最初由 benny2002 发布
[B]我觉得E是对的 [/B]


group by dept_id,salary
是不对的.

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
13#
发表于 2005-2-14 12:57 | 只看该作者

Re: 向高手请教一道 007 TESTKING 试题的正确答案!!!!

最初由 悟不空 发布
[B]Evaluate the SQL statement:
TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)
A. It releases the storage space used by the table.
B. It does not release the storage space used by the table.
C. You can roll back the deletion of rows after the statement executes.
D. You can NOT roll back the deletion of rows after the statement executes.
E. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement
executes will display an error.
F. You must be the owner of the table or have DELETE ANY TABLE system privileges to
truncate the DEPT table
Answer: B, D, F


我觉得答案应该是A,D,F, 从ORACLE 官方教材看,TRUNCATE statement does release the storage space used by the table.

请教了!!
多谢! [/B]


这道题目看起来只有D是对的,其他都错。
A/B
sometimes release storage,sometime not release storage.
F.You must be the owner of the table or have drop ANY TABLE system privileges to
truncate the DEPT table

更正一下
truncate 别人的table需要
drop any table 权限

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
14#
发表于 2005-2-14 13:00 | 只看该作者
最初由 little_soap 发布
[B]多谢!
我这还有一道题想不通,如下:

Which statement shows the department ID,minimum salary,and maximum salary paid in that department,only of the minimum salary is less than 5000 and the maximum salary is more than 15000?

A: select dept_id,min(salary(,max(salary)
     from employees
     where min(salary) <5000 and max(salary) >15000;
B: select dept_id,min(salary),max(salary)
     from employees
     where min(salary) <5000 and max(salary) >15000
     group by dept_id;
C: select dept_id,min(salary),max(salary)
     from employees
     having min(salary) <5000 and max(salary) >15000;
D: select dept_id,min(salary),max(salary)
     from employees
     group by dept_id
     having min(salary) <5000 and max(salary) <15000;
E: select dept_id,min(salary),max(salary)
     from employees
     group by dept_id,salary
     having min(salary) <5000 and max(salary) >15000;

答案是E,可我觉得没有一个答案是对的,如果D的最后一个条件是max(salary) 改为大于 15000,则D是对的。按E来执行的话则employees中的每条记录都出来了。 [/B]

题目的确是有问题。

使用道具 举报

回复
论坛徽章:
10
授权会员
日期:2005-10-30 17:05:332010年世界杯参赛球队:科特迪瓦
日期:2010-04-15 12:20:472010年世界杯参赛球队:智利
日期:2010-04-13 17:15:21生肖徽章2007版:蛇
日期:2009-09-24 13:54:11生肖徽章2007版:龙
日期:2009-09-22 13:56:012009日食纪念
日期:2009-07-22 09:30:00生肖徽章2007版:龙
日期:2009-02-10 13:45:15生肖徽章2007版:狗
日期:2009-02-03 13:53:34会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28
15#
发表于 2005-2-14 14:19 | 只看该作者
TRUNCATE statement does release the storage space used by the table.
这句话的意思就是说会释放空间,你是不是把does看成了doesnot 了?

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
16#
发表于 2005-2-14 14:24 | 只看该作者
如果不抠字眼的话
A. It releases the storage space used by the table.
可以说是对的。
严格来说,应该是
truncate statement releases the storage space used by the table that exceed the initial extent.

使用道具 举报

回复
论坛徽章:
0
17#
发表于 2005-2-14 16:00 | 只看该作者

Re: Re: 向高手请教一道 007 TESTKING 试题的正确答案!!!!

最初由 rollingpig 发布
[B]

这道题目看起来只有D是对的,其他都错。
A/B
sometimes release storage,sometime not release storage.
F.You must be the owner of the table or have alter ANY TABLE system privileges to
truncate the DEPT table [/B]

我还是觉的F是对的。查书:Delete any table :delete rows from tables,table partitions,or views in any schema
alter any table:alter any table or view in any schema

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
18#
发表于 2005-2-14 16:23 | 只看该作者

Re: Re: Re: 向高手请教一道 007 TESTKING 试题的正确答案!!!!

最初由 wtc1967 发布
[B]
我还是觉的F是对的。查书:Delete any table :delete rows from tables,table partitions,or views in any schema
alter any table:alter any table or view in any schema [/B]


呵呵
delete和truncate是两码事,你试试看就知道了。

[php]
grant resource to test1 identified by test1;
grant connect to test2 identified by test2;
create table test1.test as select sysdate as tt from dual;
grant delete any table to test2;
conn test2/test2
truncate table test1.test;
/*.....
error
....*/
conn /as sysdba
grant alter any table to test2;
conn test2/test2
truncate table test1.test;
/*.....
error
....*/
conn /as sysdba
grant drop any table to test2;
conn test2/test2
truncate table test1.test;
/* ....
success
....*/
conn /as sysdba
drop user test1 cascade;
drop user test2 cascade;
[/php]

使用道具 举报

回复
论坛徽章:
131
2006年度最佳技术回答
日期:2007-01-24 12:58:48福特
日期:2013-10-24 13:57:422014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上加薪
日期:2014-02-19 11:55:142013年新春福章
日期:2013-02-25 14:51:24
19#
发表于 2005-2-14 16:30 | 只看该作者
汗。。。。
原来不是 alter any table
而是  drop any table

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2005-2-15 00:04 | 只看该作者
最初由 rollingpig 发布
[B]汗。。。。
原来不是 alter any table
而是  drop any table [/B]

Drop any table这样就对了,谢谢您的解答,受教了!

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表