Pergunta de entrevista da empresa UBS

Can rollback statements be used in triggers?

Resposta da entrevista

Sigiloso

28 de ago. de 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.