开发者

What is the syntax to define an Oracle procedure within an another stored procedure?

开发者 https://www.devze.com 2022-12-14 14:31 出处:网络
After many Google and SO searches, I cannot find a definitive answer to this simple question: How can I define a procedure inside of another procedure to use?

After many Google and SO searches, I cannot find a definitive answer to this simple question:

How can I define a procedure inside of another procedure to use?

I know that there are nested blocks and nested procedures, but I haven't seen the exact syntax for what I want. i.e.

create or replace
PROCEDURE TOP_PROC开发者_运维问答EDURE
(...)
IS
-- nested procedure here?
BEGIN
  NULL;
END;


create or replace
PROCEDURE TOP_PROCEDURE
(...)
IS
   variable NUMBER;
   PROCEDURE nested_procedure (...)
   IS
   BEGIN
     NULL;
   END;
   PROCEDURE another_nested_procedure (...)
   IS
   BEGIN
     NULL;
   END;
BEGIN
  NULL;
END;

Local procedures must be declared after anything else (e.g. variables).

0

精彩评论

暂无评论...
验证码 换一张
取 消