What is a statement event trigger?
I saw that CUBRID supports INSTANCE events and STATEMENT events for triggers. What is the difference between them? Can you provide an example for when one should be used instead of the other?
For example, you have three rows in "fruit" table like following
and both "instance trigger" and "statement trigger" are made in this table for update.
If you execute "update fruit set name = 'grape",
instace trigger will be fired three times against each rows and statement trigger will be fired just one time.
That is to say, instance trigger is run on a row and statement trigger is run on one sql statement.
|
ID |
name |
|
1 |
apple |
|
2 |
banana |
|
3 |
cherry |