1Z0-051 QUESTION 37 关于drop table
2014-05-12 01:08
351 查看
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.
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.
相关文章推荐
- OCP 1Z0 051 QUESTION NO: 37
- 1Z0-051 QUESTION 28 关于约束
- 1Z0-051 QUESTION 29 关于约束
- 1Z0-051 QUESTION 31 关于check约束
- 1Z0-051 QUESTION 9 关于INTERSECT的用法
- OCP 1Z0 051 QUESTION NO: 21
- OCP 1Z0 051 QUESTION NO: 34
- OCP 1Z0 051 QUESTION NO: 46
- OCP 1Z0 051 QUESTION NO: 53
- OCP 1Z0 051 QUESTION NO: 59
- 1Z0-051 QUESTION 36 create table中约束应注意的地方
- OCP 1Z0 051 QUESTION NO: 4
- OCP 1Z0 051 QUESTION NO: 22
- OCP 1Z0 051 QUESTION NO: 47
- OCP 1Z0 051 QUESTION NO: 60
- 1Z0-051 QUESTION 11 运算顺序
- 1Z0-051 QUESTION 27 table的命名规则
- OCP 1Z0 051 QUESTION NO: 35
- OCP 1Z0 051 QUESTION NO: 48
- OCP-1Z0-新051-61题版本-37