Tech Sharing Blog

Computer knowledge, news, product, SEO, earn money online sharing place

Advertisement

ISNULL, NULLIF MsSQL function

By on May 21, 2009

I just found out this usefu function in MSSQL when I try to Google for the solution to replace the null value with something else. So that I no need to do the checking again in my application. The function is call


NULLIF and ISNULL


This 2 functions are actually work opposite with each other.

NULLIF(ColumnName, ValueToCompare) accept 2 parameters, and will return the NULL value if both the expression match.


IFNULL(ColumnName, NewValue) accept 2 parameters, the first parameters is the string that you wish you check with, and the 2nd parameter that you wish to replace with.


Popularity: 3% [?]

No related posts.

Comments

No Responses to “ISNULL, NULLIF MsSQL function”

Write a Comment

SEO Powered by Platinum SEO from Techblissonline