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.
table-valued function
B.
a schema-bound view
C.
a partitioned view
D.
a DML trigger
Explanation:
When you use the SchemaBinding keyword while creating a view or function you bind the structure of any
underlying tables or views. Itmeans that as long as that schemabound object exists as a schemabound object
(ie you don’t remove schemabinding) you are limited in changes that can be made to the tables or views that it
refers to.
https://sqlstudies.com/2014/08/06/schemabinding-what-why/
instead of DML trigger on a view?
17
2
If the VIEW is having AGGREGATE fucntions, it will not allow to do update on the view. To do so INSTEAD OF Trigger is compulsory.
14
0
DML trigger is the answer.
Instead of trigger is used for this update, and Instead of trigger is a type of DML trigger
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql?view=sql-server-2017
https://docs.microsoft.com/en-us/sql/relational-databases/triggers/dml-triggers?view=sql-server-2017
15
0