Syntax error: missing semicolon [closed]

1

The error message Syntax error: missing semicolon is appearing in my END IF, more specifically only the IF gets 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 ;
    
asked by anonymous 03.09.2017 / 19:30

1 answer

1

I found the solution, only one; after END IF - END IF;

    
03.09.2017 / 20:03