Taking your code,
CREATE TRIGGER UpdateStock
AFTER INSERT ON ORDERS.Quantity
FOR EACH ROW
SET New.PRODUCT.StockLevel = New.PRODUCT.StockLevel - New.ORDERS.Quantity
WHERE ORDERS.Quantity = NEW.Quantity;
, I can hardly believe that you've read and understood any documentation -- not on triggers and not on updates at least. And it surely does not compile, let alone run even with errors...
(And by the way, why not posting the relevant code here but instead on an other platform? Makes things unnecessarily harder, I think.)
ON clause of a trigger takes a table, not a column. So change
ON ORDERS.Quantity to
UPDATE follows a table, not a column. So change
UPDATE PRODUCT.Stocklevel to
Via the the
NEW pseudo table the values of the inserted row can be accessed in a
FOR EACH ROW trigger. But not any other table or their columns or the table on which the trigger is executed, for that matter. So
New.ORDERS.Quantity are nonsense. Change
SET New.PRODUCT.StockLevel = New.PRODUCT.StockLevel - New.ORDERS.Quantity to
SET StockLevel = StockLevel - New.Quantity.
And finally, there is no column
Quantity in your table
WHERE ORDERS.Quantity = NEW.Quantity; is just wrong either. And even if there were such a column, it would mean the stock level was set at all products having the same quantity (whatever that should mean in products) as the row inserted into order. I guess you want to update the stock level of the product in the order, so use the product id:
WHERE ProductID = NEW.ProductID;
That should do the trick.