I would like to execute a stored procedure within a stored procedure, e.g.
EXEC SP1
BEGIN
EXEC SP2
END
But I only want SP1
to finish after SP2
has finished running so I need to find a way for SP1
to wait for SP2
to finish before SP1
ends.
SP2
is being executed as part of SP1
so I have something like:
CREATE PROCEDURE SP1
AS
BEGIN
EXECUTE SP2
END
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…