Microsoft 70-461 Exam Practice Questions (P. 1)
- Full Access (265 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #1
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?
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?
- AALTER TABLE Inventory ADD TotalItems AS ItemsInStore + ItemsInWarehouse
- BALTER TABLE Inventory ADD ItemsInStore - ItemsInWarehouse = TotalItemss
- CALTER TABLEInventory ADD TotalItems = ItemsInStore + ItemsInWarehouse
- DALTER TABLE Inventory ADD TotalItems AS SUM(ItemsInStore, ItemsInWarehouse);
Correct Answer:
A
Reference:
http://technet.microsoft.com/en-us/library/ms190273.aspx
A
Reference:
http://technet.microsoft.com/en-us/library/ms190273.aspx
send
light_mode
delete
Question #2
You develop a Microsoft SQL Server 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?

You need to improve the performance of the view by persisting data to disk. What should you do?
- ACreate anINSTEAD OFtrigger on the view.
- BCreate anAFTERtrigger on the view.
- CModify the view to use theWITH VIEW_METADATAclause.
- DCreate a clustered index on the view.
Correct Answer:
D
Reference:
http://msdn.microsoft.com/en-us/library/ms188783.aspx
D
Reference:
http://msdn.microsoft.com/en-us/library/ms188783.aspx
send
light_mode
delete
Question #3
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?
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?
- AUse the CAST function.
- BUse the DATE data type.
- CUse the FORMAT function.
- DUse an appropriate collation.
- EUse a user-defined table type.
- FUse the VARBINARY data type.
- GUse the DATETIME data type.
- HUse the DATETIME2 data type.
- IUse the DATETIMEOFFSET data type.
- JUse the TODATETIMEOFFSET function.
Correct Answer:
I
Reference:
http://msdn.microsoft.com/en-us/library/ff848733.aspx
http://msdn.microsoft.com/en-us/library/bb630289.aspx
I
Reference:
http://msdn.microsoft.com/en-us/library/ff848733.aspx
http://msdn.microsoft.com/en-us/library/bb630289.aspx
send
light_mode
delete
Question #4
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?
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?
- AUse the CAST function.
- BUse the DATE data type.
- CUse the FORMAT function.
- DUse an appropriate collation.
- EUse a user-defined table type.
- FUse the VARBINARY data type.
- GUse the DATETIME data type.
- HUse the DATETIME2 data type.
- IUse the DATETIMEOFFSET data type.
- JUse the TODATETIMEOFFSET function.
Correct Answer:
E
E
send
light_mode
delete
Question #5
SIMULATION -
You have a view that was created by using the following code:

You need to create an inline table-valued function named Sales.fn_OrdersByTerritory, which must meet the following requirements:
✑ Accept the @T integer parameter.
✑ Use one-part names to reference columns.
Filter the query results by SalesTerritoryID.

✑ Return the columns in the same order as the order used in OrdersByTerritoryView.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the Transact-SQL in the answer area that resolves the problem and meets the stated goals or requirements. You can add Transact-SQL within the Transact-SQL segment that has been provided as well as below it.


You have a view that was created by using the following code:

You need to create an inline table-valued function named Sales.fn_OrdersByTerritory, which must meet the following requirements:
✑ Accept the @T integer parameter.
✑ Use one-part names to reference columns.
Filter the query results by SalesTerritoryID.

✑ Return the columns in the same order as the order used in OrdersByTerritoryView.
Part of the correct Transact-SQL has been provided in the answer area below. Enter the Transact-SQL in the answer area that resolves the problem and meets the stated goals or requirements. You can add Transact-SQL within the Transact-SQL segment that has been provided as well as below it.


Correct Answer:
Please review the explanation part for this answer.
CREATE FUNCTION Sales.fn_OrdersByTerritory (@T int)
RETURNS TABLE -
AS -
RETURN -
(
SELECT -
OrderID,
OrderDate,
SalesTerritoryID,
TotalDue -
FROM Sales.OrdersByTerritory -
WHERE SalesTerritoryID=@T -
)
Please review the explanation part for this answer.
CREATE FUNCTION Sales.fn_OrdersByTerritory (@T int)
RETURNS TABLE -
AS -
RETURN -
(
SELECT -
OrderID,
OrderDate,
SalesTerritoryID,
TotalDue -
FROM Sales.OrdersByTerritory -
WHERE SalesTerritoryID=@T -
)
send
light_mode
delete
All Pages