I ran a gas plant and working on its table
I have two tables
Sale(SID, Quantity, Amount, VehicleNo, Date)
Purchase(PID, Quantity, Amount, VehicleNo, Date)
I want that at every transaction stock is updated. Can you tell Am I need another table stock which update when ever these table update(If yes then how )
OR
I need to add attribute Stock in Sale that will add when ever purchase transaction is done and substract whenever sale transaction is done.
I have two tables
Sale(SID, Quantity, Amount, VehicleNo, Date)
Purchase(PID, Quantity, Amount, VehicleNo, Date)
I want that at every transaction stock is updated. Can you tell Am I need another table stock which update when ever these table update(If yes then how )
OR
I need to add attribute Stock in Sale that will add when ever purchase transaction is done and substract whenever sale transaction is done.