case null SQL Server 2008

23,630

Solution 1

CASE WHEN column IS NULL THEN 1 ELSE 0 END

Solution 2

Sometime you need case isnull(column, 99) when 99 then "null" when 1 then ....

Share:
23,630

Related videos on Youtube

Rauf
Author by

Rauf

:)

Updated on January 28, 2020

Comments

  • Rauf
    Rauf almost 4 years

    How to check for null in case statement in SQL Server 2008

  • Ross Brasseaux
    Ross Brasseaux almost 11 years
    Do you know why this is true? My SQL database will not accept "case when data is null" at all.