문제

DECLARE @IS_EMAIL CHAR(1);

IF @IS_EMAIL = '1' .....

IF (ISNULL(@IS_EMAIL , '0') = '1') .....

Will those 2 condition resolve to the same result for every value of @IS_EMAIL?

도움이 되었습니까?

해결책

Yes, they will work the same.

Second one will evaluate to if 0 = 1 when @IS_EMAIL is null.

다른 팁

Yes. But consider the first one as it's easier to understand and it should be faster.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top