您的位置:首页 > 其它

OCP-1Z0-051-V9.02-170题

2013-10-21 09:10 423 查看
170. 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 .
Answer: AE
答案解析:
A,DELETE一次只能用于移除一个表的行,正确
B,DELETE一次只能用于移除多个表的行,错误,一次只能一个表
C,DELETE只能用于删除有引用完整性约束的父表,错误,有完整性约束的父表不能被删除,除非禁用约束等
D,DELETE可以用于删除指定列的数据以及完整的行,错误,只能删除行,不能删除列
E,DELETE和TRUNCATE可以用于有引用完整性约束ON DELETE规则的父表。正确。
建表时可以使用ON DELETE CASCADE(当删除父表数据时,子表数据也一起删除)或ON DELETE CASCAD SET NULL(当删除父表数据时,子表相关的列设置为NULL)子句,可以在SQL Language Reference里的Constraints部分查找到ON DELETE子句
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: