I have three tables for managing stock levels - Product, ProductGender and ProductType. I also have a table called OrderItem that defines what is being ordered from the database.
After I have my program insert values into the OrderItem table, it identifies how much is to be ordered after the user inserts the amount into a field.
My question is - how do I subtract the amount of stock ordered from the amount of stock in the table ProductType? I know I will need some form of DELETE statement but I'm not sure quite how to craft a sufficient statement.