SQL
SQL Server Null
Null:
If the column has no value then it is NULL. A column can or cannot accept null values. If the column accepts NULL then the column is declared as is null (example: Phone is null). If the column does not accept null values then the column is declare with is not null (example: Phone is not null.
Nullif can be used to compare 2 expressions. It returns null if 2 expressions are equal else the first expression.
SELECT NULLIF(5,NULL) –5
SELECT NULLIF(5,5) –NULL
SELECT NULLIF(5,6) –5
Coalesce can be used to return first non-null value
SELECT COALESCE(NULL,NULL,6,5,4,NULL)