(难题!)两个函数互相调用不能编译!怎么解决?

[复制链接]
查看11 | 回复4 | 2005-2-28 12:57:00 | 显示全部楼层 |阅读模式
两个函数互相调用不能编译.
有两个函数 a(), b()
其中 a 中调用了 b,

b 中又调用了 a.
怎么才能编译成功, 并运行
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
什么函数?
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
自定义函数了
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
create or replace function sf_a
(
i_num in number
)
return number
as
begin
if i_num >= 100 then
return 0;
end if;
return sf_b(i_num)+1;
end;

create or replace function sf_b
(
i_num in number
)
return number
as
begin
return sf_a(i_num)+1;
end;

假设就是这样的两个函数。
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
放到package中。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行