Friday 9 October 2015

Pass4sure 70-461 Question Answer

You develop a Microsoft SQL Server 2012 server database that supports an application. The application contains a table that has the following definition:

CREATE TABLE Inventory

(ItemID int NOT NULL PRIMARY KEY,

ItemsInStore int NOT NULL,

ItemsInWarehouse int NOT NULL)

You need to create a computed column that returns the sum total of the ItemsInStore and ItemsInWarehouse values for each row.

Which Transact-SQL statement should you use?

 

A. ALTER TABLE Inventory
ADD TotalItems AS ItemsInStore + ItemsInWarehouse
B. ALTER TABLE Inventory
ADD ItemsInStore - ItemsInWarehouse = TotalItemss
C. ALTER TABLE Inventory
ADD TotalItems = ItemsInStore + ItemsInWarehouse
D. ALTER TABLE Inventory
ADD TotalItems AS SUM(ItemsInStore, ItemslnWarehouse);


Answer: A


You develop a Microsoft SQL Server 2012 database. You create a view from the Orders and OrderDetails tables by using the following definition.



 

 

You need to improve the performance of the view by persisting data to disk. What should you do? 


A.Create an INSTEAD OF trigger on the view.
B. Create an AFTER trigger on the view.
C. Modify the view to use the WITH VIEW_METADATA clause.
D. Create a clustered index on the view.


Answer: D

No comments:

Post a Comment

Note: only a member of this blog may post a comment.