如何调用具有一个OUT参数的Oracle Procedure

时间:2014-06-15 10:00:18

标签: oracle stored-procedures

我的oracle程序结构,

CREATE OR REPLACE PACKAGE BODY NLS_ADMIN."MY_PKG"
AS

   PROCEDURE DATA_PRC (oresult  OUT   NUMBER )
   IS
      varKeyValue   varchar2(1);
   BEGIN
     ...
     ...
   END;

我尝试通过执行以下语句来调用上述过程,

declare
   oresult  NUMBER;
begin
   EXECUTE DATA_PRC(oresult);
end;

但要低于例外。请帮我解释如何调用此程序。

ORA-06550: line 8, column 9:
PLS-00103: Encountered the symbol "DATA_PRC" when expecting one of the following:

   := . ( @ % ; immediate
The symbol ":=" was substituted for "DATA_PRC" to continue.

1 个答案:

答案 0 :(得分:0)

简单地说:

declare
   oresult  NUMBER;
begin
   MY_PKG.DATA_PRC(oresult);
end;