Home » Microsoft » 70-762 » What should you create
You have a view that includes an aggregate.
You must be able to change the values of columns in the view. The changes must be reflected in the tables that the view uses.
You need to ensure that you can update the view.
What should you create
A. a DML trigger
B. a schema-bound view
C. a stored procedure
D. a DDL trigger
Correct Answer: A
Explanation/Reference:
Reference
When you create a view, you must obey the following conditions in order to make the view updateable
The columns being modified in the view have to directly reference the underlying table columns. As a consequence, the view’s columns being modified cannot be the result of an aggregate function or a computed column.
The only way to make data changes on a non-updateable view is by using INSTEAD OF DML triggers. This way you can use procedural code to overcome the limitation.
References
httpswww.mssqltips.comsqlservertip5984sql-server-trigger-on-view-example