I'm trying to create the second precedence in mysql, but when I give the enter in the first line of the declare it gives the following error:
ERROR 1064 (42000)
CREATE PROCEDURE finaliza_expedicao (IN expedicao_id INT)
BEGIN
DECLARE id_prod INT;
DECLARE id_conf INT;
DECLARE id_int INT;
SELECT id INTO id_prod FROM expedicao WHERE codigo = expedicao_id;
SELECT conferencia_id INTO id_conf FROM separacao WHERE expedicao_id = id_prod;
SELECT interno_id INTO id_int WHERE conferencia_id = id_conf
UPDATE volume SET contido_em_id = NULL, area_id = NULL, expedicao_id = id_prod
WHERE id = id_int;
UPDATE expedicao SET data_fim = DATE_FORMAT(NOW(), '%Y-%m-%d H:i:s') WHERE id =
id_prod;
END