MySQL IFNULL
Function which takes two arguments, if not NULL
, the first parameter is returned, otherwise, IFNULL
the function returns the second parameter.
grammar:
IFNULL(expression_1,expression_2);
If expression_1
not NULL
, then IFNULL
the function returns expression_1
; otherwise it returns expression_2
the result.
IFNULL
Function returns a string or a number depending on the context.