Which Transact-SQL query should you use?
You administer a Microsoft SQL Server 2012 database that includes a table named Products. The Products table has columns named ProductId, ProductName, and CreatedDateTime. The table contains a unique constraint on the combination of ProductName and CreatedDateTime. You need to modify the Products table to meet the following requirements: •...
What should you do?
You develop a Microsoft SQL Server 2012 database. You create a view that performs the following tasks: • Joins 8 tables that contain up to 500,000 records each. • Performs aggregations on 5 fields. The view is frequently used in several reports. You need to improve the performance of the...
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 ....
Which Transact-SQL query should you use?
Your database contains tables named Products and ProductsPriceLog. The Products table contains columns named ProductCode and Price. The ProductsPriceLog table contains columns named ProductCode, OldPrice, and NewPrice. The ProductsPriceLog table stores the previous price in the OldPrice column and the new price in the NewPrice column. You need to increase...
Which isolation level should you use?
You use Microsoft SQL Server 2012 to write code for a transaction that contains several statements. There is high contention between readers and writers on several tables used by your transaction. You need to minimize the use of the tempdb space. You also need to prevent reading queries from blocking...
Which Transact-SQL query should you use?
A table named Profits stores the total profit made each year within a territory. The Profits table has columns named Territory, Year, and Profit. You need to create a report that displays the profits made by each territory for each year and its preceding year. Which Transact-SQL query should you...
Which Transact-SQL query should you use?
You develop a Microsoft SQL Server 2012 database that contains a table named Customers. The Customers table has the following definition: You need to create an audit record only when either the MobileNumber or HomeNumber column is updated. Which Transact-SQL query should you use?A . CREATE TRIGGER TrgPhoneNumberChange ON Customers...
What should you do?
You have three tables that contain data for vendors, customers, and agents. You create a view that is used to look up telephone numbers for these companies. The view has the following definition: You need to ensure that users can update only the phone numbers by using this view. What...