一、原题
C选项,表删除后索引会被删除
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
二、题目翻译
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. 表结构和所有数据被删除。
B. 该会话中的没结束的事务被提交。
C. 表上所有的索引会保留,但是变为无效的。
D. 视图和同义词会保留,但是变为无效的。
E. 表中所有的数据被删除,但是表结构保留。
三、题目解析
A选项正确,drop table就是删表的,所以表结构和表中的数据都被删除了。
B选项正确, 因为drop table是DDL操作,DDL会自动提交没有提交的事务。
C选项不正确,表删除后索引会被删除,详见后面解释。
D选项正确,视图和同义词仍然存在,但是无效,因为基表没有了。
E选项不正确,表都删了,哪里还有结构。
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.