Does Oracle-Procedures do all orders step by step?
Heyho,
I'm trying to set a Procedure like:
Create or Replace Procedure MyProcedure1(
x in number default 1,
y in number default 1
)
AS
Begin开发者_开发问答
If x = 1 then
MyProcedure2;
EndIf;
If y = 1 then
MyProcedure3
EndIf;
End MyProcedure1;
MyProcedure3 must be done after MyProcedure2 is completely done, because it needs some values which are set by MyProcedure2 (which has some functions included). So does Oracle first runs MyProcedure2 completely before it continues running MyProcedure1?
Yes, MyProcedure2 will run to completion before control returns to MyProcedure1, which can then go on to run MyProcedure3. Similarly, any functions called by MyProcedure2 will run to completion before MyProcedure2 returns.
精彩评论