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);
Explanation:
http://technet.microsoft.com/en-us/library/ms190273.aspx
A
0
0
D.
You must give the new column a datatype.
0
0
D is WRONG. Correct answare is A.
declare @a int = 3, @b int =4
select sum(@a,@b)
Msg 174, Level 15, State 1, Line 2
The sum function requires 1 argument(s).
0
0
A.
0
0
ALTER TABLE Inventory
ADD TotalItems AS ItemsInStore + ItemsInWarehouse
A
0
0
A
0
0
a
0
0
Besides, part of that new 200Q 70-461 dumps are available here:
https://drive.google.com/open?id=0B-ob6L_QjGLpfnJldlZxTklTaHM0akpJUzhja2pETHJOS0owMzd4eVk1UTVNQUpvdlVxVWM
Best Regards!
0
0