interbase中的存储过程问题?请指教?

hjp0214 2002-09-26 04:47:43
我的一个存储过程如下:
CREATE PROCEDURE GETNEWID
RETURNS
(
NEWID integer
)
AS
declare variable nextid integer;
BEGIN
newid=0;
nextid=0;
for select max(ID) from client
order by id into :nextid
do
begin
if (nextid>0) then
begin
newid=newid+1;
exit;
end
else
newid=nextid;
end

END
表中都有数据,
而在intebase的IBCOLoNE执行"select * from getnewid"时却得到NUll,为什么呢?
...全文
69 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,209

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 其他数据库
社区管理员
  • 其他数据库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧