开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜