CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 57: 70-461: MCSA Querying Microsoft SQL Server 2012/2014

SIMULATION -The following is a series of questions in which you are required to input one or more lines of code. To input your response -Type your response into the text entry field in the Answer Area. You may input one or more lines of code. More than one solution may be correct. You will receive credit if your solut…

Nội dung câu hỏi

SIMULATION -The following is a series of questions in which you are required to input one or more lines of code. To input your response -Type your response into the text entry field in the Answer Area. You may input one or more lines of code. More than one solution may be correct. You will receive credit if your solution matches any of the correct solutions. To validate code syntax -After entering your code, click the Check Syntax button. This validates code syntax (such as SQL commands) and values (such as table names and variable names) used in your solution. If there are any errors, they will appear in the window next to the Check Syntax button. You may change your code and re-validate the syntax as many times as you want. Note that Check Syntax does NOT validate whether you have answered the question correctly. It simply validates the accuracy of your syntax. To view available command keywordsClick the Keywords button to view a list of command keywords. This is a general list provided for reference and is not limited to commands used in the question. You plan to deploy a stored procedure for a database named TICKET S. You need to implement error handling for the stored procedure to ensure that the system-defined error messages are returned if an error occurs upon insert. Part of the correct Transact-SQL has been provided in the answer are below. Enter the code in the answer area that resolves the problem and meets the stated goals or requirements. You can add code within the code that has been provided as well as below it.

Minh họa câu hỏi Minh họa câu hỏi

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. Please review the explanation part for this answer. 1 CREATE PROCEDURE AdCase2 @CustomerId INT,3 @ProblemId INT,4 @Comment NVARCHAR (MAX)5 AS7 BEGIN TRY8 INSERT INTO Cases9 (CustomerId, ProblemId, Comment)10 VALUES11 (@CustomerId, @ProblemId, @Comment)12 END TRY13 BEGIN CATCH14 INSERT INTO AppLog15 (CurrentTime, ErrorNumber, CustomerId)16 VALUES17 (getdate(), ERROR_NUMBER(), @CustomerId);18 THROW;20 END CATCHMake changes and additions in the above lines.7 BEGIN TRY12 END TRY13 BEGIN CATCH18 THROW;20 END CATCH References:https://docs.microsoft.com/en-us/sql/t-sql/language-elements/try-catch-transact-sql?view=sql-server-2017 https://docs.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-2017 — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề