Ah, but I feel that all of your comments are missing the point of the question.
I read it to mean 'pick one answer', because it didn't say 'pick two' or 'choose all that apply'
It succeeded in tricking me, because I wasn't aware that I would get 'compilation' errors in addition to the output of the proceedure.
So just to check that my thinking is correct......
The TRY starts... and fails because it can't insert a row into a non-existant table
The TRY ends, and passes control to the CATCH.
Question: Is the @@TRANCOUNT > 0 at this point? And if it is, is it because the BEGIN TRANSACTION inside the TRY incremented it - and the COMMIT didn't decrement it because it failed.. never got to the COMMIT inside the TRY?
Either way, is it correct to think that: If the @@TRANCOUNT was greater than 0, then it would rollback, and if it was zero, then there is nothing to rollback, so either way it passes by those 3 lines with no errors, yes/no?
In my thinking, in would have gotten to the 'THROW 50000.." line...
but you say that it doesn't, that it does "Msg 266, Level 16, State 2 etc. "
ARE BOTH messages generated by the statement-level recomplilation?
Message 1= the table doesn't exist
Message 2= since the table didn't exist, I bombed out, and couldn't read the whole proceedure, therefore I have a mismatch of BEGIN / END or BEGIN/COMMIT....