PrepAway - Latest Free Exam Questions & Answers

Category: Uncategorized

Which four T-SQL statements should you use?

You use a Microsoft SQL Server 2012 database. You need to create an indexed view within the database for a report that displays Customer Name and the total
revenue for that customer. Which four T-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.)
Select and Place:

Which four Transact-SQL statements should you use?

You create a view based on the following statement:

You grant the Select permission to User1 for this view. You need to change the view so that it displays only the records that were processed in the month prior to the
current month. You need to ensure that after the changes, the view functions correctly for User1. 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.)
Select and Place:

Which three Transact-SQL statements should you use?

You use Microsoft SQL Server 2012 to develop a database that has two tables named Div1Cust and Div2Cust. Each table has columns named DivisionID and
CustomerId . None of the rows in Div1Cust exist in Div2Cust. You need to write a query that meets the following requirements:
The rows in Div1Cust must be combined with the rows in Div2Cust.
The result set must have columns named Division and Customer.
Duplicates must be retained.
Which three Transact-SQL statements should you use? (To answer, move the appropriate statements from the list of statements to the answer area and arrange
them in the correct order.)

Select and Place:

Which three Transact-SQL statements should you use?

You use Microsoft SQL Server 2012 to develop a database application. You create a table by using the following definition: CREATE TABLE Prices ( PriceId int
IDENTITY(1,1) PRIMARY KEY, ActualPrice NUMERIC(16,9), PredictedPrice NUMERIC(16,9) ) You need to create a computed column based on a user-defined
function named udf_price_index. You also need to ensure that the column supports an index. Which three 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.)
Select and Place:

Which four Transact-SQL statements should you insert at…

You create the following stored procedure. (Line numbers are included for reference only.) You need to ensure that the stored procedure performs the following
tasks:
If a record exists, update the record.
If no record exists, insert a new record.
Which four Transact-SQL statements should you insert at line 07? (To answer, move the appropriate statements from the list of statements to the answer area and

arrange them in the correct order.)

Which four Transact-SQL statements should you use?

You 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.)
Select and Place:

Which SELECT statement should you use?

You 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.

Which code segment should you use?

You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You have an application named Appl. You have a parameter named @Count that uses the int data type. App1 is configured to pass @Count to a stored procedure.

You need to create a stored
procedure named usp_Customers for Appl. Usp_Customers must meet the following requirements:
NOT use object delimiters.
Minimize sorting and counting.
Return only the last name of each customer in alphabetical order.
Return only the number of rows specified by the @Count parameter.
The solution must NOT use BEGIN and END statements.
Which code segment should you use? To answer, type the correct code in the answer area.

Which code segment should you use?

You have a database that contains the tables as shown in the exhibit. (Click the Exhibit button.)

You need to create a query that returns a list of products from Sales.ProductCatalog. The solution must meet the following requirements:
UnitPrice must be returned in descending order.
The query must use two-part names to reference the table.
The query must use the RANK function to calculate the results.
The query must return the ranking of rows in a column named PriceRank.
The list must display the columns in the order that they are defined in the table.
PriceRank must appear last.
Which code segment should you use? To answer, type the correct code in the answer area.


Page 83 of 197« First...102030...8182838485...90100110...Last »