QUESTION 89You are developing a database application by using Microsoft SQL Server 2012. An application that uses a database begins to run slowly. You discover that a large amount of memory is consumed by single-use dynamic queries. You need to reduce procedure cache usage from these statements without creating any additional indexes. What should you do?

A. Add a HASH hint to the query.B. Add a LOOP hint to the query.C. Add a FORCESEEK hint to the query.D. Add an INCLUDE clause to the index.E. Add a FORCESCAN hint to the Attach query.F. Add a columnstore index to cover the query.G. Enable the optimize for ad hoc workloads option.H. Cover the unique clustered index with a columnstore index.I. Include a SET FORCEPLAN ON statement before you run the query.J. Include a SET STATISTICS PROFILE ON statement before you run the query.K. Include a SET STATISTICS SHOWPLAN_XML ON statement before you run the query.L. Include a SET TRANSACTION ISOLATION LEVEL REPEATABLE READ statement before you run the query.M. Include a SET TRANSACTION ISOLATION LEVEL SNAPSHOT statement before you run the query.N. Include a SET TRANSACTION ISOLATION LEVEL SERIALIZABLE statement before you run the query.

QUESTION 90You have a database that contains the tables as shown below:You have a stored procedure named Procedure1. Procedure1 retrieves all order ids after a specific date. The rows for Procedure1 are not sorted. Procedure1 has a single parameter named Parameter1. Parameter1 uses the varchar type and is configured to pass the specific date to Procedure1. A database administrator discovers that OrderDate is not being compared correctly to Parameter1 after the data type of the column is changed to datetime. You need to update the SELECT statement to meet the following requirements:– The code must NOT use aliases.– The code must NOT use object delimiters.– The objects called in Procedure1 must be able to be resolved by all users.– OrderDate must be compared to Parameter1 after the data type of Parameter1 is changed to datetime.Which SELECT statement should you use? To answer, type the correct code in the answer area.Answer: SELECT Orders.OrderIDFROM OrdersWHERE Orders.OrderDate>CONVERT(datetime,@Parameter1)

QUESTION 91You use Microsoft SQL Server 2012 database to develop a shopping cart application. You need to invoke a table-valued function for each row returned by a query. Which Transact-SQL operator should you use?

QUESTION 92You develop a database application for a university. You need to create a view that will be indexed that meets the following requirements:– Displays the details of only students from Canada.– Allows insertion of details of only students from Canada.Which four Transact-SQL statements should you use? (To answer, move the appropriate SQL statements from the list of statements to the answer area and arrange them in the correct order.)Answer: Explanation:http://msdn.microsoft.com/en-us/library/ms187956.aspx

QUESTION 93What is the difference between the simple CASE expression and the searched CASE expression?

A. The simple CASE expression is used when the database recovery model is simple,and the searched CASE expression is used when it’s full or bulk logged.B. The simple CASE expression compares an input expression to multiple possible expressions in the WHEN clauses, and the searched CASE expression uses independent predicates in the WHEN clauses.C. The simple CASE expression can be used anywhere in a query, and the searched CASE expression can be used only in the WHERE clause.D. The simple CASE expression can be used anywhere in a query, and the searched CASE expression can be used only in query filters (ON, WHERE, HAVING).

Answer: B

QUESTION 94You use Microsoft SQL Server 2012 to develop a database application. You create two tables by using the following table definitions.Which five Transact-SQL statements should you use? (To answer, move the appropriate SQL statements from the list of statements to the answer area and arrange them in the correct order.)Answer: