• All SQL code is transactional. If you aren't specifically declaring transactions, you are most likely using autocommit where every statement is its own transaction. The ROLLBACK will only roll back the last transaction. (I'm ignoring nested transactions.) If you are using autocommit, the last transaction is the last statement, so the rollback will only roll back the last statement, because that is the scope of the last transaction. If you want to roll back multiple statements, you CANNOT use autocommit.

    https://msdn.microsoft.com/en-us/library/ms174377.aspx

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA