开发者

What if a trigger fails?

开发者 https://www.devze.com 2023-01-26 03:49 出处:网络
If I run an insert query, but I have a trigger on a table to increment another value bas开发者_高级运维ed upon the trigger, but there\'s something wrong with the trigger, will it still execute my quer

If I run an insert query, but I have a trigger on a table to increment another value bas开发者_高级运维ed upon the trigger, but there's something wrong with the trigger, will it still execute my query?


The following reference article should help. Basically, an error during either a BEFORE or AFTER trigger results in failure of the entire statement that caused trigger invocation.

You shouldn't need to test this out, but if you wanted to quickly test this out, simple create a dummy table with a failed insert trigger. The results would be very clear from there.

Hope I helped

0

精彩评论

暂无评论...
验证码 换一张
取 消