Question 86

DRAG DROP
You have two tables named UserLogin and Employee respectively.
You need to create a Transact-SQL script that meets the following requirements:
- The script must update the value of the IsDeleted column for the UserLogin table to 1 if the value of the Id column for the UserLogin table is equal to 1.
- The script must update the value of the IsDeleted column of the Employee table to 1 if the value of the Id column is equal to 1 for the Employee table when an update to the UserLogin table throws an error.
- The error message "No tables updated!" must be produced when an update to the Employee table throws an error.
Which five 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 87

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 are developing a report that displays customer information. The report must contain a grand total column.
You need to write a query that returns the data for the report.
Which Transact-SQL statement should you run?

  • Question 88

    DRAG DROP
    You have a project management application. The application uses a Microsoft SQL Server database to store data. You are developing a software bug tracking add-on for the application.
    The add-on must meet the following requirements:
    * Allow case sensitive searches for product.
    * Filter search results based on exact text in the description.
    * Support multibyte Unicode characters.
    You run the following Transact-SQL statement:

    You need to display a comma separated list of all product bugs filed by a user named User1.
    How should you complete the Transact-SQL statement? To answer, drag the appropriate Transact-SQL segments to the correct locations. 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 89

    DRAG DROP
    Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.
    You are developing a database to track customer orders. The database contains the following tables: Sales.Customers, Sales.Orders, and Sales.OrderLines. The following table describes the columns in Sales.Customers.

    The following table describes the columns in Sales.Orders.

    The following table describes the columns in Sales.OrderLines.

    You need to create a stored procedure that inserts data into the Customers table. The stored procedure must meet the following requirements:
    - Data changes occur as a single unit of work.
    - Data modifications that are successful are committed and a value of 0 is returned.
    - Data modifications that are unsuccessful are rolled back. The exception severity level is set to 16 and a value of -1 is returned.
    - The stored procedure uses a built-it scalar function to evaluate the current condition of data modifications.
    - The entire unit of work is terminated and rolled back if a run-time error occurs during execution of the stored procedure.
    How should complete the stored procedure definition? To answer, drag the appropriate Transact-SQL segments to the correct targets. 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 90

    You have a database named DB1 that contains a temporal table named Sales.Customers.
    You need to create a query that returns the credit limit that was available to each customer in DB1 at the beginning of 2017.
    Which query should you execute?
    A:

    B:

    C:

    D: