Mega Code Archive
Comparison Functions,Tests, Branching
COALESCE(x, y, z, ...) Returns the first parameter that is not NULL.
GREATEST(x, y, z, ...) Returns the greatest value or greatest character string.
IF(expr, val1, val2) Returns val1 if expr is true; otherwise, val2.
IFNULL(expr1, expr2) Returns expr2 if expr1 is NULL; otherwise, expr1.
INTERVAL(x, n1, n2, ...) Returns 0 if xs2.