当前位置: 代码迷 >> Oracle认证考试 >> create view WITH CHECK OPTION的有关问题
  详细解决方案

create view WITH CHECK OPTION的有关问题

热度:8237   发布时间:2013-02-26 00:00:00.0
create view WITH CHECK OPTION的问题!
Q: 137 You need to create a view EMP_VU. The view should allow the users to
manipulate the records of only the employees that are working for departments 10 or 20. Which SQL
statement would you use to create the view EMP_VU?

A. CREATE VIEW emp_vu AS
SELECT *
FROM employees[align=center][/align]
WHERE department_id IN (10,20);

B. CREATE VIEW emp_vu AS
SELECT *
FROM employees
WHERE department_id IN (10,20)
WITH READ ONLY;

C. CREATE VIEW emp_vu AS
SELECT *
FROM employees
WHERE department_id IN (10,20)
WITH CHECK OPTION;

D. CREATE FORCE VIEW emp_vu AS
SELECT *
FROM employees
WHERE department_id IN (10,20);

Answer: C

为什么选择C呢?题目意思不是创建一个视图吗?A不可以吗?

------解决方案--------------------------------------------------------
还有个条件: 
to manipulate the records of only the employees that are working for departments 10 or 20
------解决方案--------------------------------------------------------
manipulate 是操作的意思,包括查找,更新,插入等
如果不加with check options 那么在插入视图的时候可以没有限制,加了的话,只能插入department_id IN (10,20) 的记录
  相关解决方案