Hi!
I have a table for payments
what I want to accomplish is:
once a certain customer Id reached a certain amount by his accumulated payment,
it will trigger an insert into statement to my discount table to generate a code specifically for him.
i understand thats trigger is only possible for insert update and delete statements
but is there a anyway of doing this by means of different method?
im thinking of automating the SELECT SUM(amount) FROM payments WHERE id=cust_id
then do a trigger of insert into discount table if certain condition from the sum(amount) has been met.
thanks!