UBS Interview Question

Can rollback statements be used in triggers?

Interview Answer

Anonymous

Aug 28, 2010

Commit or Rollback statements cannot be used in triggers since the code that caused the trigger to fire needs to control commits or rollbacks. Using PRAGMA autonomous_transaction in your trigger, you can issue a commit or rollback. One use for this is to insert historical or log data for your table.