MySQL trigger for each row, mysqltrigger
For each, each row is affected and all triggers are executed, which is called a row-Level Trigger. In oracle triggers, row-level triggers and statement-level triggers can be executed only once regardless of the number of rows affected. Mysql does not support statement triggers, so you must write for each row;
Actual Operation Verification:
# TRIGGER test5: DELIMITER $ create trigger test5AFTERUPDATEON goodsFOR each rowbegin insert into 'ord 'VALUES (1, 2, 2); END $
Mysql only supports row-level triggers, and the number of rows affected will be executed.
How does the mysql trigger the entire table for each row to trigger only one row at a time? How does one trigger and change the entire table at a time?
This is not feasible because mysql triggers are row-level and can only be operated on rows.
The other method is to use a program instead of a trigger.
Oracle and mysql triggers for each row
For each row refers to the row of the database table.
See figure 1.
According to different trigger conditions, for each row is triggered when one row changes, because you can set before/after, so the specific conditions must be determined.
It's okay if you don't add it. What is your trigger?
--------------------------------
The conditions you have given are a bit vague. If you have any questions, please ask.