Write a trigger that updates a customer's balance field in a customer table whenever a new purchase is made, using data from a purchase table.
The trigger will automatically update the customer's balance field whenever a new purchase is made, which is the desired outcome. The approach is sound and the trigger is executed only when needed, so this is a good solution.
Evaluated at: 2022-11-14 02:15:33