1Z0-007 · Question #16
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…
The correct answer is C. CREATE VIEW emp_vu AS. Tables that underlie views often have constraints that limit the data that can be added to those tables. Views cannot add data to the underlying table that would violate the table's constraints. However, you can also define a view to restrict the user's ability to change…
Question
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?
Options
- ACREATE VIEW emp_vu AS
- BCREATE VIEW emp_vu AS
- CCREATE VIEW emp_vu AS
- DCREATE FORCE VIEW emp_vu AS
- ECREATE FORCE VIEW emp_vu AS
How the community answered
(39 responses)- A10% (4)
- C82% (32)
- D3% (1)
- E5% (2)
Explanation
Tables that underlie views often have constraints that limit the data that can be added to those tables. Views cannot add data to the underlying table that would violate the table's constraints. However, you can also define a view to restrict the user's ability to change underlying table data even further, effectively placing a special constraint for data manipulation through the view. This additional constraint says that INSERT or UPDATE statements issued against the view are cannot create rows that the view cannot subsequently select. This constraint is configured when the view is defined by adding the WITH CHECK OPTION to the CREATE VIEW statement. Incorrect Answers A: This view does not provide correct semantic of question task. B: WITH READ ONLY clause is incorrect syntax in the CREATE VIEW command. D: This view does not provide correct semantic of question task. E: NO UPDATE clause is incorrect syntax in the CREATE VIEW command.
Topics
Community Discussion
No community discussion yet for this question.