请检查我的包裹和程序.
我的包裹:
create or replace package transaction1 as
procedure enter_transaction(acc number, kind varchar2, amount number);
procedure apply_transaction;
end;
/
Run Code Online (Sandbox Code Playgroud)
这是我的身体:
create or replace package body transaction1 as
procedure enter_transaction(acc in number, kind in varchar2, amount in number)
is
begin
end;
procedure apply_transaction
is
begin
end;
end;
/
Run Code Online (Sandbox Code Playgroud)
什么是警告?为什么?
如果看到警告:Errors: check compiler log
然后运行show errors
命令,您将看到错误日志:
7/5 PLS-00103: Encountered the symbol "END" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
14/5 PLS-00103: Encountered the symbol "END" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
Run Code Online (Sandbox Code Playgroud)
如果你的包体有Oracle抱怨,因为BEGIN END
块不包含任何命令.
在Oracle中,BEGIN-END块必须至少包含一个命令.可能为NULL,如果你不想运行任何东西(并且不要忘记在NULL命令后放置分号):
PROCEDURE ......
IS
BEGIN
NULL;
END;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7611 次 |
最近记录: |