Question 16
70-761
70-761 practice questions, page 4 of 8, with answer review and explanations.
Question 17
You need to create a stored procedure to update a table named Sales.Customers. The structure of the table is shown in the exhibit. (Click the exhibit button.) The stored procedure must meet the following requirements: ✑ Accept two input parameters. ✑ Update the company name if the customer exists. ✑ Return a custom error message if the customer does not exist. 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. NOTE: More than one order of answer choices is correct. You will receive credit for any of the correct orders you select. Select and Place:
Question 18
You need to create an indexed view that requires logic statements to manipulate the data that the view displays. Which two database objects should you use? Each correct answer presents a complete solution.
- a user-defined table-valued function
- a CRL function
- a stored procedure
- a user-defined scalar function
Question 19
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 to1. ✑ 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. Select and Place:
Question 20