I'm trying to make a function inside the sql server, however, I can not use it because an error appears saying that the result is more than one line (Error Code: 1172 Result consisted of more than one row) I can solve this.
'CREATE FUNCTION 'retornaSolo'(id int(11)) RETURNS varchar(80) CHARSET latin1
BEGIN
declare solos varchar (80);
select tipo_solo into solos from solo where status_solo = 'Ativado'
and cod_usuario = id;
RETURN solos;
END'