• I very rarely use GOTO, in fact I cannot remember when I last used it.

    If I have a large stored proc with a complex transaction then on failure of any part of the transaction I might use GOTO to jump to the ROLLBACK TRANSACTION code.

    To be honest, TRY...CATCH handles most scenarios for me.

    GOTO is useful when some processing logic results in a value that indicates that the rest of the transactional process should not proceed.

    The alternative is to set a BIT variable to TRUE and after each step in the transaction set it to FALSE if the success criteria is not met.

    Wrap each step in the transaction up in

    IF @SuccessFLAG=1

    BEGIN

    ...

    END