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?A . Use the CAST function.B ....
What should you do?
You are developing a database application by using Microsoft SQL Server 2012. An application that uses a database begins to run slowly. Your investigation shows the root cause is a query against a read-only table that has a clustered index. The query returns the following six columns: • One column...
Which object should you use?
You develop a Microsoft SQL Server 2012 database. You need to create a batch process that meets the following requirements: • Returns a result set based on supplied parameters. • Enables the returned result set to perform a join with a table. Which object should you use?A . Inline user-defined...
Which code segment should you use?
CORRECT TEXT 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....
Which Transact-SQL statement should you include at the beginning of the stored procedure?
You create a stored procedure that will update multiple tables within a transaction. You need to ensure that if the stored procedure raises a run-time error, the entire transaction is terminated and rolled back. Which Transact-SQL statement should you include at the beginning of the stored procedure?A . SET XACT_ABORT...
Which code segment should you use?
CORRECT TEXT You have a database that contains the tables shown in the exhibit. (Click the Exhibit button). You need to create a query for a report. The query must meet the following requirements: • NOT use object delimiters. • Return the most recent orders first. • Use the first...
What should you do?
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...
Which code segment should you use?
CORRECT TEXT 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....
Which Transact-SQL statement should you use?
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...
On which column in the Employee table should you create a self-reference foreign key constraint?
You administer a Microsoft SQL Server 2012 database. The database contains a table named Employee. Part of the Employee table is shown in the exhibit. (Click the Exhibit button.) Unless stated above, no columns in the Employee table reference other tables. Confidential information about the employees is stored in a...