1Z0-051 QUESTION 37 关于drop table

37. 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. 

Answer: ABD

解析:

A选项正确,删除表时表结构也删除了;

B选项正确,因为drop table是DDL语句,会自动提交;

C选项错误,删除表时候索引一起删除;

D选项正确,删除表时,视图和同义词会保留,但无效;

E选项错误,删除表时,结构也删除了。

官方文档参考:

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.
If the table is a base table for a view, a container or master table of a materialized view, or if it is referenced in a stored procedure, function, or package, then the database invalidates these dependent objects but does not drop them. You cannot use these objects unless you re-create the table or drop and re-create the objects so that they no longer depend on the table.
If you choose to re-create the table, then it must contain all the columns selected by the subqueries originally used to define the materialized views and all the columns referenced in the stored procedures, functions, or packages. Any users previously granted object privileges on the views, stored procedures, functions, or packages need not be regranted these privileges.
If the table is a master table for a materialized view, then the materialized view can still be queried, but it cannot be refreshed unless the table is re-created so that it contains all the columns selected by the defining query of the materialized view.
If the table has a materialized view log, then the database drops this log and any other direct-path INSERT refresh information associated with the table.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值