PrepAway - Latest Free Exam Questions & Answers

How should you alter this view to allow users to update data through the SalesV?

You work as a database administrator at ABC.com. ABC.com has a SQL Server 2012 database
named SalesDB. The SalesDB database is shown in the following database diagram:

You create a view on the SalesDB using the following Transact-SQL code:
CREATE VIEW SalesV
WITH SCHEMABINDINGS
AS
SELECT Products.ProductID, Invoices.InvoiceDate, SUM (Products.RetailPrice *
OrderDetail.Quantity * OrderDetail.SalesDiscount) AS Price
FROM OrderDetail INNER JOIN Products ON
OrderDetail.ProductID = Products.ProducID
INNER JOIN Invoices ON
OrderDetail.InvoiceID = Invoices.InvoiceID
GROUP BY Products.ProductID, Invoices.InvoiceDate

GO
How should you alter this view to allow users to update data through the SalesV?

PrepAway - Latest Free Exam Questions & Answers

A.
You should add a CHECK constraint to the SalesV view.

B.
You should add an INSTEAD OF trigger to the SalesV view.

C.
You should add a clustered index to the SalesV view.

D.
You should add an AFTER UPDATE trigger to the SalesV view.

E.
Create a columnstore index on all columns used in the SalesV view.

Explanation:

3 Comments on “How should you alter this view to allow users to update data through the SalesV?


Leave a Reply