Is possible to do a ROLLBACK in a MySQL trigger?

前端 未结 3 2025
逝去的感伤
逝去的感伤 2021-01-13 14:22

Just that is the question: is possible to do a ROLLBACK in a MySQL trigger?

If answer is yes, then, please, explain how.

3条回答
  •  春和景丽
    2021-01-13 14:57

    If the trigger raises an exception, that will abort the transaction, effectively rolling back. Will this work for you?

提交回复
热议问题