I want to create a stored procedure that automatically updates the balance of each transaction class after insert, update and delete operations. I have one relation with four attributes, combination between id and transaction_class is the primary key.
Table Transcation:
Id Transaction_Class Credit Debit Balance
-------------------------------------------------
1 1 0 100 200
2 2 0 1000 500
3 1 0 100 200
4 3 0 1000 1000
5 2 500 0 500
If I ‘INSERT INTO


Check Solution