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

38. Which two statements are true regarding views? (Choose two.)
A. A simple view in which column aliases have been used cannot be updated. 
B. Rows cannot be deleted through a view if the view definition contains the DISTINCT keyword.   
C. Rows added through a view are deleted from the table automatically when the view is dropped. 
D. The OR REPLACE option is used to change the definition of an existing view without dropping and re-creating it. 
E. The WITH CHECK OPTION constraint can be used in a view definition to restrict the columns displayed through the view. 
Answer: BD
答案解析:
A错误,简单视图可以执行DML操作。
B正确,包含DISTINCT关键字不能被修改。
C错误,删除视图不会影响视图的基表。
D正确,使用OR REPLACE选项,可以创建一个视图,甚至可以创建一个与已存在的视图同名的视图,以便替换旧版本的视图。这意味着可以更改视图,而不必经过删除、重新创建对象和重新授予对象权限的过程。
E错误,WITH CHECK OPTION子句指定通过视图执行的INSERT和UPDATE不能创建该视图无法选择的行。因此,能够对要插入或更新的数据强制执行完整性约束条件和数据验证检查。而不是限制显示的值。
原文地址:https://www.cnblogs.com/hzcya1995/p/13316925.html