What is the syntax for defining an Oracle procedure in another stored procedure?

After many searches on Google and SO, I cannot find the final answer to this simple question:

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

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

create or replace PROCEDURE TOP_PROCEDURE (...) IS -- nested procedure here? BEGIN NULL; END; 
+7
oracle plsql stored-procedures
source share
1 answer
 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).

+16
source share

All Articles