tilac 发表于 2015-11-9 11:06:21

OCP-1Z0-051 第170题 DELETE的注意事项

一、原题
Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.)
A. DELETE can be used to remove only rows from only one table at a time.
B. DELETE can be used to remove only rows from multiple tables at a time.
C. DELETE can be used only on a table that is a parent of a referential integrity constraint.
D. DELETE can be used to remove data from specific columns as well as complete rows.
E. DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint having ON DELETE rule.

答案:AE

二、题目翻译
关于DELETE和TRUNCATE命令哪两个句子是正确的?(选择两个)
A.DELETE一次只能用于移除一个表的行。
B.DELETE一次只能用于移除多个表的行。
C.DELETE只能用于删除有引用完整性约束的父表。
D.DELETE可以用于删除指定列的数据以及完整的行。
E.DELETE和TRUNCATE可以用于有引用完整性约束ON DELETE规则的父表。

三、题目解析
表可以使用ON DELETE CASCADE选项(当删除父表数据时,子表数据也一起删除)或ON DELETE CASCAD SET NULL选项(当删除父表数据时,子表相关的列设置为NULL),
有这些选项,就可以在父表中直接删除相关的行,而不会报外键约束错误。

         版权声明:本文为博主原创文章,未经博主允许不得转载。
页: [1]
查看完整版本: OCP-1Z0-051 第170题 DELETE的注意事项