What is the result of each Transact-SQL statement?

HOTSPOT

You have the following stored procedure:

You run the following Transact-SQL statements:

What is the result of each Transact-SQL statement? To answer, select the appropriate options in the answer area.

Answer:

Explanation:

Box 1: All transactions are rolled back.

The first IF-statement, IF @CODE = ‘C2323’ AND @ApplicationID = 1, will be true, an error will be raised, the error will be caught in the CATCH block, and the only transaction that has been started will be rolled back.

Box 2: All transactions are rolled back.

When nesting transactions, this same statement rolls back all inner transactions to the outermost BEGIN TRANSACTION statement.

References: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/rollback-transaction-transact-sql

Latest 70-761 Dumps Valid Version with 212 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments