Question 116
You run the following Transact-SQL statement:

You need to create a stored procedure that meets the following requirements:
* Inserts data into the Employees table.
* Processes all data changes as a single unit of work.
* Sets the exception severity level to 16 and an error number of 60, 000 when any error occurs.
* If a Transact-SQL statement raises a runtime error, terminates and reverts the entire unit of work, and
* indicates the line number in the statement where the error occurred.
* Inserts the value New Employee for the Title column if no title is provided.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segment to the correct target. Each Transact-SQL segment may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.


You need to create a stored procedure that meets the following requirements:
* Inserts data into the Employees table.
* Processes all data changes as a single unit of work.
* Sets the exception severity level to 16 and an error number of 60, 000 when any error occurs.
* If a Transact-SQL statement raises a runtime error, terminates and reverts the entire unit of work, and
* indicates the line number in the statement where the error occurred.
* Inserts the value New Employee for the Title column if no title is provided.
How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segment to the correct target. Each Transact-SQL segment may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

Question 117
Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.
You create a table by running the following Transact-SQL statement:

You need to develop a query that meets the following requirements:
* Output data by using a tree-like structure.
* Allow mixed content types.
* Use custom metadata attributes.
Which Transact-SQL statement should you run?


You create a table by running the following Transact-SQL statement:

You need to develop a query that meets the following requirements:
* Output data by using a tree-like structure.
* Allow mixed content types.
* Use custom metadata attributes.
Which Transact-SQL statement should you run?


Question 118
You create three tables by running the following Transact-SQL statements:

For reporting purposes, you need to find the active user count for each role, and the total active user count.
The result must be ordered by active user count of each role. You must use common table expressions (CTEs).
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.


For reporting purposes, you need to find the active user count for each role, and the total active user count.
The result must be ordered by active user count of each role. You must use common table expressions (CTEs).
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.

Question 119
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You create a table named Customer by running the following Transact-SQL statement:

You create a cursor by running the following Transact-SQL statement:

If the credit limit is zero, you must delete the customer record while fetching data.
You need to add the DELETE statement.
Solution: You add the following Transact-SQL statement:

Does the solution meet the goal?
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You create a table named Customer by running the following Transact-SQL statement:

You create a cursor by running the following Transact-SQL statement:

If the credit limit is zero, you must delete the customer record while fetching data.
You need to add the DELETE statement.
Solution: You add the following Transact-SQL statement:

Does the solution meet the goal?
Question 120
Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.
You have a database that contains tables named Customer_CRMSystem and Customer_HRSystem. Both tables use the following structure:

The tables include the following records:
Customer_CRMSystem

Customer_HRSystem

Records that contain null values for CustomerCode can be uniquely identified by CustomerName.
You need to display a Cartesian product, combining both tables.
Which Transact-SQL statement should you run?
A:

B:

C:

D:

E:

F:

G:

H:

You have a database that contains tables named Customer_CRMSystem and Customer_HRSystem. Both tables use the following structure:

The tables include the following records:
Customer_CRMSystem

Customer_HRSystem

Records that contain null values for CustomerCode can be uniquely identified by CustomerName.
You need to display a Cartesian product, combining both tables.
Which Transact-SQL statement should you run?
A:

B:

C:

D:

E:

F:

G:

H:
