Classic Post: Half Of You Don't Understand Variables and Transactions. www.brentozar.com/archive/2020...
Do table variables and variables respect transactions? If I set the value of a variable during a transaction, and I roll it back, what happens? DECLARE @MySalary INT = 100000; BEGIN TRAN SET…