OCP-1Z0-051 第37题 drop table

一、原题
You issued the following command to drop the PRODUCTS table:
SQL> DROP TABLE products;
What is the implication of this command? (Choose all that apply.)
A. All data along with the table structure is deleted.
B. The pending transaction in the session is committed.
C. All indexes on the table will remain but they are invalidated.
D. All views and synonyms will remain but they are invalidated
E. All data in the table are deleted but the table structure will remain

答案:ABD

二、题目翻译
执行下面的命令删除PRODUCTS表:
该命令隐含什么意思?(选择所有正确的选项)
A. 表结构和所有数据被删除。
B. 该会话中的没结束的事务被提交。
C. 表上所有的索引会保留,但是变为无效的。
D. 视图和同义词会保留,但是变为无效的。
E. 表中所有的数据被删除,但是表结构保留。

三、题目解析

A选项正确,drop table就是删表的,所以表结构和表中的数据都被删除了。
B选项正确, 因为drop table是DDL操作,DDL会自动提交没有提交的事务。
C选项不正确,表删除后索引会被删除,详见后面解释。
D选项正确,视图和同义词仍然存在,但是无效,因为基表没有了。
E选项不正确,表都删了,哪里还有结构。

     

C选项,表删除后索引会被删除

具体详见11.2联机文档DROP TABLE描述:
         http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9003.htm#SQLRF54943

摘录如下:

       All table indexes and domain indexes are dropped, as well as any triggers defined on the table, regardless of who created them or whose schema contains them. If table is partitioned, then any corresponding local index partitions are also dropped.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值