Unable to handle exception in MYSQL Function
问题 I am not very familiar with MYSQL functions & exception handling. After all the research I could come up with below, but to no gain. I am trying to return 0 if insert statement execution fails and 1 otherwise. Exception is getting raised instead of being handled. Where am i going wrong? CREATE DEFINER=`myusr`@`localhost` FUNCTION `func1`(p1 varchar(50), p2 varchar(6)) RETURNS int(1) READS SQL DATA DETERMINISTIC BEGIN DECLARE EXP DATETIME; DECLARE RINT INT(1); DECLARE CONTINUE HANDLER FOR