PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to optimize the statement

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 in its WHERE clause contained in a non-clustered index
Four additional columns
One COUNT (*) column based on a grouping of the four additional columns
You need to optimize the statement.
What should you do?

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 the values in the Price column of all products in the Products table by 5 percent. You also need to log the changes to the ProductsPriceLog
table.
Which Transact-SQL query should you use?


Page 861 of 6,830« First...102030...859860861862863...870880890...Last »