After Insert Trigger

  • I have an After Insert Trigger. When the trigger fails the Insert is also rolledback. Everything I read says that the Insert is completed prior to the execution of the trigger. Why does the Insert get rolled back if this is the case? And is there a trick around theInsert beeing Rolled Back?

  • To leave the database in a consistent state.

    If the trigger detect an error a rollback / undo of the 'insert' is automatically performed.

    Read about Codd and his 10 relational commandments.

  • The trigger fires within the transaction created by the Insert statement. If you do not want the trigger to rollback the Insert statement, you will have to drop the trigger. Must check why the trigger is failing the transaction.

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

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