是否将执行带有输出参数的存储过程,直到执行完毕?

时间:2019-02-28 09:18:27

标签: sql

我有一个存储过程。在SQL SERVER中

ALTER PROCEDURE [dbo].[Test] 
    @Test
AS
BEGIN
    // Inside It, I am calling another SP with OUTPUT PARAM
  exec B
    @ErrorCode = @error output


-- SP B Will Return error if there is any in the logic

-- HERE I am checking 

IF(@error>0)
        UPDATE [dbo].[C] 
        SET IS_DELETED = 0,
        WHERE Id = 7

END

是否有可能在设置@error之前发生更新语句?

0 个答案:

没有答案