Reputation: 1
i have this message when i try to execute this code:
CREATE TRIGGER `verifier_stockmin` BEFORE INSERT ON `produits`
FOR EACH ROW
BEGIN
IF new.Stock-new.StockMin < 100 THEN
RAISE_APPLICATION_ERROR(-20512, 'stock insuffisant');
END IF;
END;
Upvotes: 0
Views: 67
Reputation: 2770
raise_application_error
is an Oracle construct. You want signal
raise application error Trigger in MySQL DBMS
Upvotes: 1