Numeric functions

The following table describes the supported numeric functions.

Function Description
ABS Returns the absolute value of a number.
ACOS Returns the arc cosine (inverse cosine, in radians) of a number.
ASIN Returns the arc sine (inverse sine, in radians) of a number.
ATAN Returns the arc tangent (inverse tangent, in radians) of a number.
ATAN2 Returns the arc tangent of two variables.
BIT_COUNT Returns the number of bits set to 1 in the binary representation of a number.
CEIL Returns the smallest integer greater than or equal to a given number.
CEILING Synonym for CEIL.
COS Returns the cosine of an angle expressed in radians.
COT Returns the cotangent of an angle expressed in radians.
CRC32 Returns the CRC32 checksum value of a given string.
DEGREES Converts an angle from radians to degrees.
DIV Performs integer division, returning the quotient of a division operation, discarding any remainder.
EXP Returns the value of e raised to the power of a given number (e^x).
FLOOR Returns the largest integer less than or equal to a given number.
GREATEST Returns the greatest value among a list of arguments.
LEAST Returns the smallest value among a list of arguments.
LN Returns the natural logarithm (base e) of a number.
LOG Returns the logarithm of a number, with an optional base argument.
LOG10 Returns the base-10 logarithm of a number.
MOD Returns the remainder of a division operation (modulo).
PI Returns the mathematical constant pi (π), approximately 3.14159.
POW Synonym for POWER.
POWER Returns a number raised to the power of an exponent, where the base is the first argument and the exponent is the second.
RADIANS Converts an angle from degrees to radians.
RAND Returns a random floating-point value between 0 and 1.
ROUND Rounds a number to a specified number of decimal places.
SIGN Returns the sign of a number: -1 if the number is negative, 0 if the number is zero, and 1 if the number is positive.
SIN Returns the sine of an angle expressed in radians.
SQRT Returns the square root of a number.
TAN Returns the tangent of an angle expressed in radians.
TRUNCATE Truncates a number to a specified number of decimal places without rounding.

For more information, see the MySQL documentation: Numeric Functions and Operators.