开发者

What if a trigger fails?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜