devnumbertwo - $h!t for developers

View Original

ms sql server equivalent of oracle’s NVL function

oracle’s NVL function:

See this content in the original post

a1 and a2 are expressions
return a2 if a1 is NULL
return a1 if a1 is not NULL

ms sql server equivlent is the ISNULL function:

See this content in the original post

a1 is checked for NULL
a2 is returned if a1 is NULL
return a1 if a1 is not null