Modifying a MySQL Trigger
I have a MySQL trigger that I would like to be modified. The only changes are in the trigger body.
Will updating the ACTION_STATEMENT
Colu开发者_如何学编程mn in INFORMATION_SCHEMA.TRIGGERS
suffice? Is this the right way to update a trigger? Specifically, I am looking for any problems that might arise by doing this.
That won't work.
You need to drop the trigger and recreate it.
http://dev.mysql.com/doc/refman/5.1/en/create-trigger.html
Download dbForge express (is free as in Beer).
Connect with that and edit the trigger.
Download page http://www.devart.com/dbforge/mysql/studio/download.html
Direct link https://www.devart.com/dbforge/mysql/studio/dbforgemysql80exp.exe
Don't muck about in the information_schema.
Oh and don't use MySQL workbench 5.2 I've had that one eat my work twice (..gone..) never again.
No I don't have shares, just a happy dbForge user
The ACTION_STATEMENT column contains the statement to be executed when the trigger is invoked. This is the same as the text displayed in the Statement column of the output from SHOW TRIGGERS. Note that this text uses UTF-8 encoding. MYSQL TRIGGERS SCHEMA TABLE
You're right, if you edit the ACTION_STATEMENT field, you modify the SQL action.
精彩评论