开发者

Does Oracle-Procedures do all orders step by step?

开发者 https://www.devze.com 2023-01-09 09:10 出处:网络
Heyho, I\'m trying to set a Procedure like: Create or Replace Procedure MyProcedure1( x in number default 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?


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.

0

精彩评论

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