MySQL Numeric Functions

Function Usage Returns
ABS() ABS(n) The absolute value of n
CEILING() CEILING(n) The next-highest integer based upon the value of n
FLOOR() FLOOR(n) The integer value of n
FORMAT() FORMAT(n1, n2) n1 formatted as a number with n2 decimal places and commas inserted every three spaces
MOD() MOD(n1, n2) The remainder of dividing n1 by n2
POW() POW(n1, n2) n1 to the n2 power
RAND() RAND() A random number between 0 and 1.0
ROUND() ROUND(n1, n2) n1 rounded to n2 decimal places
SQRT() SQRT(n) The square root of n