我對MySQL相當陌生。我完全有能力查詢和創建表格,但從未嘗試過觸發器。MySQL觸發器和「引用」
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REFERENCING NEW AS N INSERT INTO mora(Email) VALUES (N.Email)' at line 3
我不知道我在做什麼錯:
CREATE TRIGGER TrigMora AFTER INSERT ON cliente
REFERENCING NEW AS N
INSERT INTO mora(Email) VALUES (N.Email);
我得到這個錯誤。 這個想法看起來很基本。在表格「客戶」上新插入後,「電子郵件」行中的信息應複製到表格「mora」中。
您的語法讓我想起了Oracle。你確定你正在閱讀正確的數據庫引擎的文檔嗎? –