I have 2 tables like below:
I. Detail Stock:
2. TrsDate. (This field could have more than one in the same ItemCode).
II. Total Stock.
2. ItemQty (ItemQty-ItemUsed)
How to write trigger to update Total Stock table if there is a change (add, update or delete) in Detail Stock table?