Call a stored procedure with another in Oracle

后端 未结 5 1921
北荒
北荒 2020-11-27 15:57

Does anyone know of a way, or even if its possible, to call a stored procedure from within another? If so, how would you do it?

Here is my test code:



        
5条回答
  •  感情败类
    2020-11-27 16:09

    Sure, you just call it from within the SP, there's no special syntax.

    Ex:

       PROCEDURE some_sp
       AS
       BEGIN
          some_other_sp('parm1', 10, 20.42);
       END;
    

    If the procedure is in a different schema than the one the executing procedure is in, you need to prefix it with schema name.

       PROCEDURE some_sp
       AS
       BEGIN
          other_schema.some_other_sp('parm1', 10, 20.42);
       END;
    

提交回复
热议问题