views:

32

answers:

1

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?

+3  A: 

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.

Tony Andrews
cool! thank you!
Husky110