I need the right syntax for MySQL trigger:
CREATE TRIGGER `parent_comm`
BEFORE UPDATE ON `employee` FOR EACH ROW
BEGIN
SET NEW.`parent_com`=(NEW.`com_amt`*10/100)
WHERE `id` = NEW.`parent_id`
END;
ERROR:
#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 'WHERE
id
= NEW.parent_id
END' at line 5