Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If @@TRANCOUNT is equal to 1, then the COMMIT TRAN statement decrements @@TRANCO

ID: 3579800 • Letter: I

Question

If @@TRANCOUNT is equal to 1, then the COMMIT TRAN statement

decrements @@TRANCOUNT and commits the transaction

decrements @@TRANCOUNT but doesn’t commit the transaction

commits the transaction but doesn’t decrement @@TRANCOUNT

partially commits the transaction

You have a table called Students and you need to process the data 1 student at a time.What should you use?

Stored Procedure

IF…..ELSE block

< >

< >

You have the following code, what will be the output?

DECLARE @var int

SET @var=2

IF @var=3

      PRINT ‘FIRST STATEMENT’

      PRINT’SECOND STATEMENT’

SECOND STATEMENT

FIRST STATEMENT

SECOND STATEMENT

FIRST STATEMENT

Output will contain nothing

decrements @@TRANCOUNT and commits the transaction

decrements @@TRANCOUNT but doesn’t commit the transaction

commits the transaction but doesn’t decrement @@TRANCOUNT

partially commits the transaction

Explanation / Answer

Answers:

1.decrements @@TRANCOUNT and commits the transaction

2.IF…..ELSE block

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote