Syntax error: Missing semicolon

Asked

Viewed 2,487 times

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 ;

1 answer

1

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.