OCP 1Z0 051 38
2014-05-17 17:07
176 查看
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.
A
C
B
E with check option的用处
Answer: BD
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.
A
SQL> create or replace view v_t1 as select c as v_c from t1; View created SQL> insert into v_t1(v_c) values(2); 1 row inserted SQL> select * from t1; C ---------- 2 1 row selected
C
SQL> alter table v_t1 add c2 int; alter table v_t1 add c2 int ORA-00942: 表或视图不存在 SQL> alter table t1 add c2 int; Table altered
B
SQL> create or replace view v_t1 as select distinct c as v_c from t1; View created Executed in 0.016 seconds SQL> insert into v_t1(v_c) values(2); insert into v_t1(v_c) values(2) ORA-01732: 此视图的数据操纵操作非法
E with check option的用处
SQL> create or replace view v_t1 as select c as v_c from t1 where c <=2 with check option; View created Executed in 0.031 seconds SQL> insert into v_t1(v_c) values(4); insert into v_t1(v_c) values(4) ORA-01402: 视图 WITH CHECK OPTION where 子句违规
Answer: BD
相关文章推荐
- OCP-1Z0-新051-61题版本-38
- OCP 1Z0 051 QUESTION NO: 38
- OCP-1Z0-051 补充题库 第14题 关于表约束的视图
- OCP-1Z0-051 补充题库 第15题 子查询和join
- OCP-1Z0-051 补充题库 第22题 SYNONYM同义词
- OCP-1Z0-051-题目解析-第9题
- OCP-1Z0-051-题目解析-第24题
- OCP-1Z0-051-题目解析-第48题
- OCP-1Z0-051-2015-28题
- OCP-1Z0-051-标题决心-文章2称号
- OCP-1Z0-051-名称解析-文章12称号
- OCP-1Z0-051-2015-38题
- OCP-1Z0-051-2015-49题
- OCP-1Z0-051-V9.02-145题
- OCP-1Z0-051-V9.02-110题
- OCP-1Z0-051-V9.02-148题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051 62题个人理解
- OCP-1Z0-051-V9.02-48题
- OCP-1Z0-051-V9.02-53题