关于自定义函数中如果查询结果为空,如何返回值的问题
写了如下函数:
DECLARE tempValue1 varchar(50);
select lesionLayerL into tempValue1 from EyeBottomPhoto where projectUuid=projectUUID and patientUuid=patientUUID order by id desc limit 0,1;
RETURN(tempValue1);
发现如果传的参数查不到记录,返回值是什么呢?想查不到返回-1或空.不知道如何写