我对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。你确定你正在阅读正确的数据库引擎的文档吗? –