Hi, I am using two tables, lets call them biguser (90+ fields) and smalluser (10 fields). Smaller table is used to speed up search. I am trying to add a trigger that deletes record from smalluser after its deleted in biguser, just like this (id is autoincrement on biguser and non-autoincrement key field on smalluser):
CREATE TRIGGER deluser AFTER DELETE ON biguser
FOR EACH ROW BEGIN
DELETE FROM smalluser WHERE id=OLD.id;
And this query always return the following result:
#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 '; |' at line 4
MySQL Server is version 5.0.45. After insert trigger worked perfectly.