ISNULL(expressions)
In SQL 2008 r2, we have ISNULL() T-SQL predefined function to validate null values. If the retruning value is null then we can replace the variable with our predefined value.
Syntax: ISNULL(check_expression , replacement_value )
Eg:
The Result will be:
- Prints '0' if the PhoneNumber value is NULL for given customer ID.
- Prints 'PhoneNumber' if the given customerID holds phone number in that row.
No comments:
Post a Comment