Hola que tal, haber si alguien me puede hechar una mano ya tengo un buen rato tratando de ver el error en este procedimiento.
Código:
CREATE FUNCTION `usuariobd`.`Test` () RETURNS varchar(150)
BEGIN
DECLARE resultado varchar(150);
select perfiles.nombrePerfil into resultado from perfiles where perfiles.idPerfiles=1;
return resultado;
END;
El error es este:
Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Que estaré haciendo mal? gracias por su ayuda. Saludos!