编纂存储过程时出现:Recursive stored functions and triggers are not allowed

编纂存储过程时出现:Recursive stored functions and triggers are not allowed

编写存储过程时出现:Recursive stored functions and triggers are not allowed.

最近在学习mysql的存储过程,编写实例时出现这个错误:Recursive stored functions and triggers are not allowed.请问怎么解决呢?代码如下:

BEGIN

#Routine body goes here…

IF n>=2 THEN

RETURN n*factorial(n-1);

ELSE

RETURN n;

end if;

END



存储过程不能return




函数才能用return




MYSQL中函数不允许使用递归调用,仅在存储过程中可以递归调用。

编纂存储过程时出现:Recursive stored functions and triggers are not allowed

相关文章:

你感兴趣的文章:

标签云: