Developing SQL Databases — Question 32
You have a database with multiple tables. You must insert data into the tables by using views.
Which of the following two statements best describes an updatable view?
NOTE: Each correct selection is worth one point.
Answer options
- A. The view must not include the primary key of the table.
- B. The view may include GROUP BY or HAVING statements.
- C. The view may include a composite field.
- D. Each view must reference columns from one table.
- E. The view must not include subqueries.
Correct answer: B, D
Explanation
Option B is correct because an updatable view can indeed include GROUP BY or HAVING clauses depending on the context of use. Option D is also correct, as an updatable view must reference columns from only one table to allow for proper data insertion. The other options either impose restrictions that do not apply to updatable views or are incorrect in their assertions.