Table component:
Table material:
How can I write a trigger to decrease the material_quantity
value in the material
table when component_quantity
is increased?
By the way the component is made from material so when one component's quantity is increased, the material's quantity which has same material_id
will be decrease with the same amount.