可以在MySQL触发器中执行ROLLBACK吗?
问题描述:
这就是问题:可以在MySQL触发器中进行ROLLBACK吗?
Just that is the question: is possible to do a ROLLBACK in a MySQL trigger?
如果答案是肯定的,那么请解释如何做.
If answer is yes, then, please, explain how.
答
如果触发器引发异常,则会中止事务,从而有效回滚.这对您有用吗?
If the trigger raises an exception, that will abort the transaction, effectively rolling back. Will this work for you?