Link to home
Start Free TrialLog in
Avatar of AMLabels
AMLabels

asked on

After Insert Trigger & Rollback

If a Stored Procedure contains an insert statement wrapped in a transaction and that transaction is rolled back in the procedure, does the after trigger still fire? Or is the trigger only called upon the commit statement?

Thanks.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

if the procedure is like this:

  begin transaction
    insert into table ...
  rollback

and the table has a insert trigger, the trigger WILL fire
Avatar of AMLabels
AMLabels

ASKER

would the rowcount from the inserted table work to identify whether the stored procedure's insert had indeed been successful?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial