📜  trigger verifier stock - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:31.349000             🧑  作者: Mango

代码示例1
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