SQL - Triggers
You wrote this trigger but it causes a runtime error:
What is the likely cause of the error?
CREATE TRIGGER trg_log AFTER INSERT ON sales FOR EACH ROW BEGIN INSERT INTO sales_log VALUES (NEW.id, NEW.amount); UPDATE sales SET amount = amount * 1.1 WHERE id = NEW.id; END;
What is the likely cause of the error?
