You develop a Microsoft SQL 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?
Answer : A
Explanation:
Reference:
http://technet.microsoft.com/en-us/library/ms190273.aspx
You develop a Microsoft SQL Server database. You create a view from the Orders and OrderDetails tables by using the following definition.
Answer : D
Explanation:
Reference:
http://msdn.microsoft.com/en-us/library/ms188783.aspx
Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in the series.
You develop a database for a travel application. You need to design tables and other database objects.
You create the Airline_Schedules table.
You need to store the departure and arrival dates and times of flights along with time zone information.
What should you do?
Answer : I
Explanation:
Reference:
http://msdn.microsoft.com/en-us/library/ff848733.aspx
http://msdn.microsoft.com/en-us/library/bb630289.aspx
Note: This question is part of a series of questions that use the same set of answer choices. An answer choice may be correct for more than one question in the series.
You develop a database for a travel application. You need to design tables and other database objects.
You create a stored procedure. You need to supply the stored procedure with multiple event names and their dates as parameters.
What should you do?
Answer : E
Explanation:
SIMULATION -
You have a view that was created by using the following code:
Answer : Please review the explanation part for this answer.
Explanation:
CREATE FUNCTION Sales.fn_OrdersByTerritory (@T int)
RETURNS TABLE -
AS -
RETURN -
(
SELECT -
OrderID,
OrderDate,
SalesTerritoryID,
TotalDue -
FROM Sales.OrdersByTerritory -
WHERE SalesTerritoryID=@T -
)