L' Eomot Inversé (4/19/2013)
There is one issue with the question, albeit an utterly trivial one: it depends on the setting of IMPLICIT_TRANSACTIONS for the connection. If that's set ON, the rollback includes rolling back the two CREATE statements and the select will return not 1 but an error. Of course the default is OFF, but it would be preferable to mention that the OFF setting is assumed.
Ahh, yes. Good catch, Tom! I should have thought of that when I created the question.