开发者

When creating a trigger in MySQL, are there any alternatives to FOR EACH ROW?

开发者 https://www.devze.com 2023-01-09 10:17 出处:网络
I would like to create an after update trigger that runs only once even if mult开发者_运维百科iple rows have been updated.Nope:

I would like to create an after update trigger that runs only once even if mult开发者_运维百科iple rows have been updated.


Nope: http://dev.mysql.com/doc/refman/5.0/en/faqs-triggers.html#qandaitem-23-5-1-11

In MySQL 5.0, all triggers are FOR EACH ROW—that is, the trigger is activated for each row that is inserted, updated, or deleted.

However, see the following hack.

0

精彩评论

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