ALTER PROCEDURE p_test @name VARCHAR(11)AS IF (@name = NULL) RETURN 1 ELSE RETURN 2 DECLARE @return INT; EXEC @return = p_test '2'; SELECT 'Return ' = @return;