• honza.mf (10/5/2010)


    I don't know. You are right but experiments show this behaviour.

    Many times I read BOL or some other documentation I feel like being in the helicopter.

    BoL often makes me feel like that. And the experiment in this case shows another oddity: when in autocommit mode, a reference to @@tc in the statement bring auto-committed will be evaluated before the transaction is started (hence the 0 count in the first and fourth rows).

    I've written quite a lot of things that look at @@tc for various reasons, but results like these make me very very careful about doing it!

    Tom