Go to the first, previous, next, last section, table of contents.


Control flow functions.

IFNULL(A,B)
If A is not NULL it returns A, else B.
mysql> select ifnull(1,0);        -> 1
mysql> select ifnull(0,10);       -> 0
mysql> select ifnull(1/0,10);     -> 10
IF(A,B,C)
If A is true (A <> 0 and A <> NULL) then return B, else return C. A is evaluated as an INTEGER, which means that if you are using floats you should also use a comparison operation.
mysql> select if(1>2,2,3);        -> 3


Go to the first, previous, next, last section, table of contents.