我已经创建了一个MySQL函数,并且如果为参数传递的值无效,则会引发错误.在MySQL函数中引发错误的选项有哪些?
我想在MySQL存储函数中使用goto.我该怎么用?示例代码是:
if (action = 'D') then
if (rowcount > 0) then
DELETE FROM datatable WHERE id = 2;
else
SET p=CONCAT('Can not delete',@b);
goto ret_label;
end if;
end if;
Label: ret_label;
return 0;
Run Code Online (Sandbox Code Playgroud)