Microsoft Querying Microsoft SQL Server 2012/2014 - 070-461 Exam Practice Test

You use a Microsoft SQL Server 2012 database that contains a table named BlogEntry that has the following columns:

Id is the Primary Key.
You need to append the "This is in a draft stage" string to the Summary column of the recent 10 entries based on the values in EntryDateTime.
Which Transact-SQL statement should you use?

Correct Answer: D Vote an answer
You administer a Microsoft SQL Server 2012 database named ContosoDb. Tables are defined as shown in the exhibit. (Click the Exhibit button.)

You need to display rows from the Orders table for the Customers row having the CustomerId value set to 1 in the following XML format.
<CUSTOMERS Name="Customer A" Country="Australia">
<ORDERS OrderID="1" OrderDate="2001-01-01" Amount="3400.00" />
<ORDERS OrderID="2" OrderDate="2002-01-01" Amount="4300.00" />
</CUSTOMERS>
Which Transact-SQL query should you use?

Correct Answer: A Vote an answer
You are designing a table for a SQL Server database. The table uses horizontal partitioning.
You have the following requirements:

You need to choose the appropriate data type for the key value.
What should you do?

Correct Answer: C Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You are developing a Microsoft Azure SQL Database instance to support a company's payroll system. The database contains a table named Employee defined by the following Transact-SQL statement:

The company defines five employee levels. Each employee's level is stored in the Level column. Levels 1,2, and 3 are used for non-executive employees. Levels 4 and 5 are used for executives. Each of the non-executive levels has a defined range that constrains the salary of employees at that level.
You need to create a view that allows non-executive Employees entries to be updated based on the following rules:
* Only non-executive employees can be viewed or updated.
* Employees can be promoted to a non-executive level.
* Employees cannot be promoted to an executive level.
If an employees' salary changes, the new salary must adhere to the company-defined range for that level.
Which four Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-SQL segments to the answer area and arrange them in the correct order.
Correct Answer:

Explanation:
Box 1: WITH SCHEMABINDING AS
The syntax is: CREATE VIEW
WITH SCHEMABINDING
AS
Box 2:
SELECT DISTINCT cannot be used here.
Box 3: ORDER BY
Box 4:
Create a clustered index.
References: https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views?view=sql-server-2017
Your database contains a table named SalesOrders. The table includes a DATETIME column named OrderTime that stores the date and time each order is placed. There is a non-clustered index on the OrderTime column.
The business team wants a report that displays the total number of orders placed on the current day.
You need to write a query that will return the correct results in the most efficient manner.
Which Transact-SQL query should you use?

Correct Answer: A Vote an answer
You administer several Microsoft SQL Server 2012 database servers. Merge replication has been configured for an application that is distributed across offices throughout a wide area network (WAN). Many of the tables involved in replication use the XML and varchar (max) data types. Occasionally, merge replication fails due to timeout errors. You need to reduce the occurrence of these timeout errors. What should you do?

Correct Answer: D Vote an answer
You have a Microsoft SQL Server database that contains two tables named SalesTax and SalesTerritory.
You need to write a query that will return all possible combinations of SalesTax and SalesTerritory, regardless of whether two particular records are related.
Which Transact-SQL statement should you run?

Correct Answer: D Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You are a database developer of a Microsoft SQL Server database.
The database contains a table named Instructor that has the following definition:

You are designing a new table named Course that has the following definition:

You need to ensure that the InstructorId column in the Course table contains only values that exist in the InstructorID column of the Instructor table.
Which Transact-SQL statement should you use?

Correct Answer: D Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
You use Microsoft SQL Server 2012 to develop a database application.
You need to create an object that meets the following requirements:
* Takes an input variable
* Returns a table of values
* Cannot be referenced within a view
Which object should you use?

Correct Answer: D Vote an answer

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어