Transaction rollback in a Trigger

  • I have a stored procedure with some insert statement inside it, and a trigger is there for the table in insert command.

    Inside the trigger i have few other insert commands to another table.

    All the statements in the stored procedure are inside a transaction and if an exception occurred after running the insert command and the trigger is fired then the transaction is rolled back in the procedure.

    Now my doubt is what will happen for the inserts happened inside the trigger, whether those will also be rolled back or not???

  • It will rollback.

    Also see this

    http://msdn.microsoft.com/en-gb/library/ms187844.aspx

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply