下面这个存储过程的例子执行提示存在循环一样,有什么解决办法吗?
-- 达梦
DROP PROCEDURE IF EXISTS testEntry1;
CREATE PROCEDURE testEntry1(num in int)
AUTHID DEFINER
AS
/变量说明部分/
cc int;
BEGIN
cc:= num+1;
if cc%10 == 0 then
select cc;
end if;
if cc <10 THEN
CALL testEntry2(cc);
end if;
END;
DROP PROCEDURE IF EXISTS testEntry2;
CREATE PROCEDURE testEntry2(num in int)
AUTHID DEFINER
AS
/变量说明部分/
cc int;
BEGIN
cc:= num+1;
if cc%10 == 0 then
select cc;
end if;
if cc <10 THEN
CALL testEntry1(cc);
end if;
END;
CALL testEntry1(0);
DROP PROCEDURE IF EXISTS testEntry1;
DROP PROCEDURE IF EXISTS testEntry2;
根本就没解决,谁给点的解决,好气啊
调用存储过程这样写试试
execute IMMEDIATE 'CALL testEntry2('||cc||')';
首先确认下你这个例子的目的是什么呢,看你的调用

CALL testEntry1(0);
这种情况,按你的写法,就是死循环