I want to write a trigger for table users. When a new user is added, if his title is IT related, a record is created in the IT Contact List table.
So I wrote the following trigger.
CREATE TRIGGER `test1` INSERT ON `Users` FOR EACH ROW BEGIN IF INSTR(Title,'IT') > 0 THEN INSERT INTO IT_contact_list (name,title) value (username,Title); END IF; END;
It has error "Unknown column header in field list" but it does exist in tables Users and IT_contact_list. So what's the problem? Thanks.
Fixed and tested in workbench. Try this: