I get an error when I try to create the below trigger on MySQL/MariaDB
CREATE TRIGGER `ABC` BEFORE INSERT ON `TABLE1`
FOR EACH ROW BEGIN
DECLARE LCL_VAR INTEGER;
SET LCL_LCL_VAR = NEW.A - NEW.B;
SET NEW.D= V;
END;
ERROR
CREATE TRIGGER
Q_DUR_CALCBEFORE INSERT ONTASK_Q_SWHFOR EACH ROW BEGIN DECLARE LCL_Q_DUR INTEGER;MySQL said: Documentation
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3
I've got a couple other triggers that I used to build this one. I can't figure out what is wrong syntactically with this. Can I please request for help to spot the problem with this?