📅  最后修改于: 2022-03-11 15:05:31.349000             🧑  作者: Mango
BEGIN
UPDATE `product`
SET `price` = NEW.price
, `quantity` = NEW.quantity
, date_modified = NOW()
WHERE `product_id` = NEW.product_id;
AND price > NEW.price
AND quantity > 0
;
END