Creating Understanding and Educating Programmers, Developers and Technical Communities, one post at a time.

Wednesday, February 16, 2011

ISNULL

ISNULL ( check_expression , replacement_value )

Today, I am writing my thoughts on T-SQL specific function isnull(). Current database system allows null values. Null itself does not show any meaning but when end users need data reports/application require data then it becomes problem.

ISNULL function convert null values into meaningful data value. Isnull function checks expression and if it founds null then replace it with second argument (replacement value expression) otherwise return first argument.

We still have coalesce() and nullif() functions to control null values in more flexible way.

No comments:

Post a Comment