I'm fairly new to MySQL. I'm perfectly capable of making queries and creating tables, but never tried triggers before.
CREATE TRIGGER TrigMora AFTER INSERT ON cliente
REFERENCING NEW AS N
INSERT INTO mora(Email) VALUES (N.Email);
I'm getting this error:
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
I'm wondering what I'm doing wrong. The idea seemed pretty basic. After a new insertion on table "cliente", the info in the row "Email" should be copied to table "mora".