SQL Server Performance

RollBack in Trigger table

Discussion in 'SQL Server 2008 General DBA Questions' started by michellesbs, Apr 28, 2013.

  1. michellesbs New Member

    Hi,

    I run a store procedure to update 3 tables, one of the table have trigger setting, when table C hit the trigger, why only Table C will rollback records? but table A & B still updated ?

    I want all the Table in Store Procedure to Rollback if hits the trigger, anyone can help ? TQ

    Store Procedure :

    begin Tran
    Begin Try
    Update table A
    Update table B
    Update table C (have trigger setting with ROLLBack tran)
    End Try

    Begin Catch
    return 1
    End Catch

    Commit Tran

Share This Page