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?
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:
isn’t this code missing something? like I don’t know a god damn UNION ALL statement. Sigh. I hope the real exam has better code.
c
but why ācā only is the answer
but why “c” only is the answer
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.
Wow because this is great work! Congrats and keep it up
Dimitar Berbatov http://www.massmca.org/planroom/item/2823