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?

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?

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:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


lewis

lewis

b

shv

shv

but why “b” only is the answer

Signature :
shiv

Derek

Derek

This is a bad question, none of the answers will work.
The WITH SCHEMABINDINGS clause requires all objects to have two part names, which they don’t.