I am trying to test/learn how to use triggers.
on mySql 5.0 (Server version: 5.0.37-log)
If I do this:
Code:
CREATE TABLE t (column1 TINYINT);
CREATE TABLE t_test (column2 TINYINT);
CREATE TRIGGER trigger_test
AFTER INSERT ON t
FOR EACH ROW BEGIN
INSERT INTO t_test (column2) VALUES ('6');
END;
Every time I get error message:
#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 'INSERT INTO t_test (column2) VALUES (6)' at line 4
I can't see what I am doing wrong here? Could this be a privilege problem?