The following example shows how to use an instance event. The example trigger is called by each instance affected by the database update. For example, if the score values of five instances in the history table are modified, the trigger is called five times. If you want the trigger to be called only once, before the first instance of the score column is updated, use the STATEMENT UPDATE type as in example 2.
CREATE TRIGGER example
...
BEFORE UPDATE ON history(score)
...
The following example shows how to use a statement event. If you define a statement event, the trigger is called only once before the first instance gets updated even when there are multiple instances affected by the update.
CREATE TRIGGER example
...
BEFORE STATEMENT UPDATE ON history(score)
...