I have a stored procedure. In 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
Is there any possibility that the update statement happens before @error is set ?