首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

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

2012-07-05 
编写存储过程时出现:Recursive stored functions and triggers are not allowed.最近在学习mysql的存储过

编写存储过程时出现: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中函数不允许使用递归调用,仅在存储过程中可以递归调用。

热点排行