PopeScooby
PopeScooby

Reputation: 3

Multiple stored procedures within a stored procedure and waiting

I have seen several posts similar to this but none with a strait forward answer. Sorry if this is a stupid question, I have taught myself SQL and am still learning.

I have a stored procedure that a user starts from an Excel document. That stored procedure runs several other stored procedures. These internal stored procedures need to run in sequence. My question is, will stored procedure 2 wait for stored procedure 1 to finish before starting?

I need to make sure that the second one does not start before the first one finishes.

Upvotes: 0

Views: 1377

Answers (1)

Justin Cave
Justin Cave

Reputation: 231751

As Ben indicates, it would be helpful to specify which database you're using because every database's procedural extensions to SQL (PL/SQL in Oracle, T-SQL in SQL Server, etc.) are different. That being said, however, I am not aware of any database that would do anything other than have stored procedure 1 run to completion, then run stored procedure 2. That's true of any procedural language, whatever is on line N of a procedure has to run to completion before whatever is on line N+1 of that procedure can run.

Upvotes: 2

Related Questions