What happens when an after Insert or after update Rigger fails?

Asked

Viewed 25 times

0

I have a question about triggers. If there is an after Insert or after update Rigger and this Rigger has an SQL routine that cannot be executed or it fails what happens to the updated record / inserted? Does this happen within a transaction? In Rigger’s failure a rollback would be executed?

  • The sql operation will be undone , other operations will depend on the total statement , being in transaction or not. Details on doc https://dev.mysql.com/doc/refman/8.0/en/trigger-syntax.html

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.