오류 메세지
MariaDB server version for the right syntax to use near 'DECLARE CONTINUE handler for Not FOUND SET v_result = 'Y' at line 7
CREATE FUNCTION F_RES_INFO_UPD(P_RSO_CD VARCHAR(100), P_END_DATE varchar(100))
RETURNS CHAR(1)
BEGIN
DECLARE v_result CHAR(1)
DECLARE CONTINUE handler for NOT FOUND SET v_result = 'Y' ;
DECLARE CONTINUE handler for SQLEXCEPTION SET v_result = 'Y' ;
BEGIN
SELECT CASE WHEN RES_BACK_DATE IS NULL THEN 'Y' ELSE 'N' END
INTO v_result
FROM (
SELECT @R:=@R+1 RNUM , A.* FROM TBR_RES_INFO A, ( SELECT @R:=0 ) B
WHERE RSO_CD = P_RSO_CD
AND CONCAT(RES_USEDATE_FROM, RES_USETIME_FROM) >= P_END_DATE
AND RES_DEL_FLAG = 'N'
ORDER BY CONCAT(RES_USEDATE_FROM, RES_USETIME_FROM) ASC
) A
WHERE RNUM = 1;
END;
RETURN v_result;
END