DROP TRIGGER IF EXISTS t_afterinsert_on_tab1;
CREATE TRIGGER t_afterinsert_on_tab1
AFTER INSERT ON tab1
FOR EACH ROW
BEGIN
insert into tab2(tab2_id) values(new.tab1_id);
END;
报错
you have an error in your sql syntax; check the manual that correspinds to your mysql server version for the right syntax to use near "end" at line 1
这样呢?
更正:
END后应该有分号