mysql中的表中插入数据后如何触发触发器

发布于 2024-08-29 07:31:28 字数 66 浏览 0 评论 0原文

我想在我的表填满记录后触发触发器,我不想触发按行触发器。

请告诉我们如何在 mysql 中做到这一点?

I want to fire a trigger after my table has been filled with records ,I don't want to fire a row-wise trigger.

Please tell how can we do that in mysql?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渡你暖光 2024-09-05 07:31:28
CREATE TRIGGER trigger_name AFTER INSERT ON table_name

更新:

FOR EACH ROW 选项确定触发器是行触发器还是语句触发器。如果指定 FOR EACH ROW,则触发器将为受触发语句影响的表的每一行触发一次。缺少 FOR EACH ROW 选项表示触发器仅针对每个适用的语句触发一次,而不是针对受该语句影响的每一行单独触发。

CREATE TRIGGER trigger_name AFTER INSERT ON table_name

Updated:

The FOR EACH ROW option determines whether the trigger is a row trigger or a statement trigger. If you specify FOR EACH ROW, then the trigger fires once for each row of the table that is affected by the triggering statement. The absence of the FOR EACH ROW option indicates that the trigger fires only once for each applicable statement, but not separately for each row affected by the statement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文