I want to ask someone? This is right or wrong trigger... Cause i use this syntax and get error result..
I want if i delete 1 row in table item then in table itemchild where item.itemcode=itemchild.itemchildcode deleted too..
CREATE TRIGGER test BEFORE DELETE ON item
FOR EACH ROW BEGIN
DELETE FROM itemchild WHERE itemchildcode = NEW.itemcode;
END;
If wrong, please tell me the right way... Thanks...

