现在的位置: 首页 > 综合 > 正文

OCP-1Z0-052-V8.02-168题

2014年09月05日 ⁄ 综合 ⁄ 共 1672字 ⁄ 字号 评论关闭

168. You execute this command to drop the ITEM table, which has the primary key referred in the ORDER

table:

SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE;

Which two statements are true about the effect of the command? (Choose two.)

A.No flashback is possible to bring back the ITEM table.

B.The ORDER table is dropped along with the ITEM table.

C.The dependent referential integrity constraints in the ORDER table are disabled.

D.The dependent referential integrity constraints in the ORDER table are removed.

E.The table definition of the ITEM table and associated indexes are placed in the recycle bin.

Answer: AD

答案解析:

CASCADE CONSTRAINTS

Specify to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error
and does not drop the table.

指定CASCADE CONSTRAINTS 语句是指删除所有的参照完整性约束包括主键约束和唯一性约束。

如果不指定此语句,则参照完整性约束还存在,drop table时会返回一个错误。

PURGE

Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify
PURGE, then the database does not place the table and its dependent objects into the
recycle bin.

指定PURGE,意味着在drop table的同时也释放了和它相关联的空间。如果指定PURGE,那么数据库不会将表和它相关联的对象放置到回收站。

flashback drop是基于回收站的,如果回收站里没有相关信息,则无法恢复。

Caution:

You cannot roll back a DROP TABLE statement with the
PURGE
clause, nor can you recover the table if you have dropped it with the
PURGE clause.

在drop table指定purge时,不能rollback,也不能恢复。

Using this clause is equivalent to first dropping the table and then purging it from the recycle bin. This clause lets you save one step in the process. It also provides enhanced security if you want to prevent sensitive material from appearing in the recycle
bin.

使用这条语句,相当于先drop表,然后清空回收站。

如果你想防止敏感材料出现在回收站中使用purge后清空材料,提供了增强的安全性。

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9003.htm#sthref5853

抱歉!评论已关闭.