i am trying to update quantity of product when order is placed but sql is returning garbage value when trying to fetch current value

前端 未结 0 1880
说谎
说谎 2021-01-12 16:23
BEGIN
DECLARE var integer;
SELECT stock INTO var FROM product WHERE pno = new.pid;
UPDATE product SET s=var,product.stock= var - new.quantity WHERE pno = new.pid;
EN         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题