有没有办法以与例外情况相同的方式捕获所有错误,例如异常可以像
一样被捕获DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
GET DIAGNOSTICS CONDITION 1
`@failurecode` = RETURNED_SQLSTATE, `@failuremsg` = MESSAGE_TEXT;
SELECT 'FAILURE' AS RESULT, `@failurecode` AS RESULTCODE,
`@failuremsg` AS RESULTMESSAGE;
END;
可以在一个语句中捕获所有错误吗?