0
是否可以從MySQL中的函數調用過程?我收到錯誤「不允許從函數返回結果集」。我希望將過程調用的結果插入到函數變量中,就像我直接在函數中完成SELECT INTO一樣。MySQL:從函數調用過程
該函數的(簡化的)定義爲
create function my_function()
returns int deterministic
begin
declare some_parameter int;
declare the_result int;
call my_procedure(some_parameter, the_result)
return the_result;
end;
的步驟(簡化的)定義爲:
create procedure my_procedure(in my_parameter int, out my_result int)
begin
select 1
from dual;
end;