1
Syntax error message: Missing semicolon is appearing in my END IF, more specifically only the IF is underlined with red:
DELIMITER $
CREATE PROCEDURE cadastraEleitor(IN nome VARCHAR(100),dataNasc DATE)
BEGIN
IF ( (SELECT (year(curdate())) - (SELECT (year(dataNasc)))) < 16) THEN
SELECT ('INDIVIDUO NAO PODE VOTAR - 16');
ELSE
INSERT INTO eleitor VALUES (NULL,nome,dataNasc);
END IF
END
$ DELIMITER ;