Answers for "trigger stock phpmyadmin"

SQL
0

trigger stock phpmyadmin

DELIMITER $$
CREATE TRIGGER invlevel_AUPD
AFTER UPDATE ON invlevel 
FOR EACH ROW
BEGIN
  IF NEW.quantity < 20 THEN 
    INSERT INTO orders (productid, amount)
    SELECT productid, amount 
      FROM reorder 
     WHERE productid = NEW.productid;
  END IF;
END$$
DELIMITER ;
Posted by: Guest on May-26-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language