Numeric Functions and Operators mysql>  SELECT IFNULL(1,0); -> 1 mysql>  SELECT IFNULL(NULL,10); -> 10 mysql>  SELECT IFNULL(1/0,10); -> 10 mysql>  SELECT IFNULL(1/0,’yes’); -> ’yes’ mysql>  CREATE TABLE tmp SELECT IFNULL(1,’test’) AS test; mysql>  DESCRIBE tmp; +-------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+-------+ | test | varbinary(4) | NO | | | | +-------+--------------+------+-----+---------+-------+ mysql>  SELECT NULLIF(1,1); -> NULL mysql>  SELECT NULLIF(1,2); -> 1 Name Description % ,  MOD Modulo operator * Multiplication operator + Addition operator - Minus operator - Change the sign of the argument / Division operator ABS() Return the absolute value ACOS() Return the arc cosine 2137 12.6 Numeric Functions and Operators Table 12.8 Numeric Functions and Operators Note MySQL evaluates  expr1  twice if the arguments are not equal. The return value has the same type as the first argument. Returns  NULL  if  expr1  =  expr2  is true, otherwise returns  expr1 . This is the same as  CASE WHEN expr1  =  expr2  THEN NULL ELSE  expr1  END . In this example, the type of the  test  column is  VARBINARY(4)  (a string type). The default return type of  IFNULL( expr1 , expr2 )  is the more “general”  of the two expressions, in the order  STRING ,  REAL , or  INTEGER . Consider the case of a table based on expressions or where MySQL must internally store a value returned by  IFNULL()  in a temporary table: If  expr1  is not  NULL ,  IFNULL()  returns  expr1 ; otherwise it returns  expr2 . • IFNULL( expr1 , expr2 ) • NULLIF( expr1 , expr2 )