PrepAway - Latest Free Exam Questions & Answers

What should you implement on the view?

ABC.com has a SQL Server 2012 database infrastructure that has a database named ComDB.
You have created a view using the following Transact-SQL code:
CREATE VIEW ABCCommunications
(Type, CompanyID, CompanyName, Location, ContactName, Email, Phone)
AS
SELECT ‘Clients’ AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = ‘Client’
SELECT ‘Partners’ AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = ‘Partner’
SELECT ‘Guests’ AS Type, CompanyID, CompanyName, Location, ContactName, Email, Phone
FROM CommList
WHERE Relation = ‘Guests’
GO
You want the view to be used to edit all columns except the CompanyID, CompanyName and
Location columns.
What should you implement on the view?

PrepAway - Latest Free Exam Questions & Answers

A.
You should consider implementing an AFTER UPDATE trigger.

B.
You should consider implementing an Index.

C.
You should consider implementing an INSTEAD OF UPDATE trigger.

D.
You should consider implementing a CHECK constraint.

Explanation:

6 Comments on “What should you implement on the view?

  1. Derek says:

    The question is whacked, but the intent is obvious. The answer is C.
    The view has multiple underlying tables, this necessitates any updates occur with an INSTEAD OF trigger.
    A is wrong, their can be no after trigger if the view can’t update.
    B is a distraction.
    C is correct.
    D is a distraction.




    0



    0

Leave a Reply