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 May 13, 2022

Comments

  • Rauf
    Rauf 15 days

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

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