I'm trying to create a trigger where I set a colunm to 0 if another column is set to 0 and 1 if it's set higher than 0. This is what I wrote
CREATE TRIGGER livre_disponible BEFORE INSERT ON livres
FOR EACH ROW
IF NEW.nb_exemplaires=0 THEN
ELSEIF NEW.nb_exemplaires>=1 THEN
The error is said to be on line 5 which is the first "SET".
I this the correct syntax to do it?