sqlserver case when using the method

sql using a case when then determines whether the field is not null effect

The CASE columnName the WHEN null THEN ELSE 0 END columnName
although columnName is empty, but the result is not 0, the result should be zero fishes.

Correct wording:

CASE WHEN columnName is null THEN 0 ELSE columnName END

Guess you like

Origin www.cnblogs.com/ming-blogs/p/11431265.html