Error PLS-00201 必须声明标识符 'EVEN'

1、错误描述

Compilation errors for FUNCTION SCOTT.ODD

Error: PLS-00201: 必须声明标识符 'EVEN'
Line: 4
Text: Result := not Even(Value);

Error: PL/SQL: Statement ignored
Line: 4
Text: Result := not Even(Value);

2、错误原因
create or replace function Odd(Value in integer) return boolean is 
    Result boolean;
   begin 
    Result := not Even(Value);
    return (Result);
   end Odd; 
    由于这个函数中需要调用Even函数,但是这个函数没有定义,所以会报错

 

3、解决办法

create or replace function Even(Value in integer) return boolean is
    Result boolean;
   begin
     Result := (Value mod 2 = 0);
     return (Result);
   end Even;
    新建Even函数


再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

猜你喜欢

转载自www.cnblogs.com/odejsjhshw/p/10372850.html