Context
Let’s define a datastore made of 2 stores joined together. One sales store:Register an insertion-time update-where procedure
Let’s start by registering an insertion-time trigger on the sales store which updates the inserted rows where the product is “Product1” to double the Amount. For insertion-time triggers it is only possible to select fields in the updated table.Register a commit-time update-where procedure
Let’s now register a commit-time trigger on the sales store which update the “Is Meaningful” field to true for all the rows where the Amount multiplied by the Unit Price is greater than 1000. In order to do that, we need the value from 2 different stores at the same time, which is not possible with insertion-time triggers.Note that the procedure will take effect immediately in the current transaction.
And even if we only update the content of the target store the procedure will be triggered as well: