Math Functions
MySQL math functions can be used to change the value of columns containing numeric values.
ABS( )This MySQL function returns the absolute value of a given number. |
INET_NTOA( )This MySQL function converts the numeric equivalent of an IP address to its dot-quad notation. |
ACOS( )This MySQL function returns the arccosine, in radians, of a given number. |
LEAST( )Use this MySQL function to compare two or more values and return the smallest value. |
ASIN( )This MySQL function returns the arcsine, in radians, of a given number. |
LN( )This MySQL function returns the natural logarithm of its input. |
COT( )This MySQL function returns the cotangent of a number. |
LOG( )This MySQL function returns the logarithm of the first argument to the base indicated by the second argument. |
CONV( )This MySQL function converts a number from one numeric base system to another. |
LOG2( )This MySQL function returns the base-two logarithm of a given number. |
COS( )This MySQL function returns the cosine of number, where number is expressed in radians. |
LOG10( )This MySQL function returns the base 10 logarithm of a given number. |
CEILING( )This MySQL function rounds a given floating-point number up to the next higher integer. |
MOD( )This MySQL function returns the remainder of a number given in the first argument when divided by the number given in the second argument, the modulo. |
CEIL( )This MySQL function rounds a given floating-point number up to the next higher integer. |
OCT( )This MySQL function returns the octal or base 8 numeric system value of the given number. |
BIT_COUNT( )This MySQL function returns the number of bits set in the argument, which is an integer that the function treats as a binary number. |
PI( )This MySQL function returns by default the first five decimal places of the number pi. |
ACOS( )This MySQL function returns the arccosine, in radians, of a given number. |
POW( )This MySQL function returns the result of raising the number given in the first argument to the exponent given in the second argument. |
ASIN( )This MySQL function returns the arcsine, in radians, of a given number. |
POWER( )This MySQL function returns the result of raising the number given in the first argument to the power of the number given in the second argument. |
ATAN( )This MySQL function returns the arctangent, in radians, of a given number. |
RADIANS( )This MySQL function converts degrees to radians. |
ATAN2( )This MySQL function returns the arctangent, in radians, of X and Y for a point on a Cartesian plane. |
RAND( )This MySQL function returns a random floating-point number from 0 to 1. |
DEGREES( )This MySQL function converts radians to degrees. |
ROUND( )This MySQL function rounds a number given in the first argument to the nearest integer. |
EXP( )This MySQL function returns the value of the natural logarithm base number e to the power of the given number. |
SIGN( )This MySQL function returns -1 if the given number is a negative, 0 if it is zero, and 1 if it is positive. |
FLOOR( )This MySQL function rounds a given floating-point number down to the next lower integer. |
SIN( )This MySQL function returns the sine of the number given, where number is expressed in radians. |
FORMAT( )This MySQL function returns the given floating-point number with a comma inserted between every three digits and a period before the number of decimal places specified in the second argument. |
SQRT( )This MySQL function returns the square root of its input, which must be a positive number. |
GREATEST( )This MySQL function compares two or more values, returning the greatest value. |
TAN( )This MySQL function returns the tangent of an angle, where number is expressed in radians. |
INET_ATON( )This MySQL function converts an Internet Protocol (IP) address in dot-quad notation to its numeric equivalent. |
TRUNCATE( )This MySQL function returns a number equivalent to its first argument, removing any digits beyond the number of decimal places specified in the second argument. |

Need Math Examples
Although we did well in math classes all through school, we have very little experience with the Math Functions of MySQL very little. As a result, we don't have very good examples for them. If you work in science or engineering and have some ideas for easy to understand examples that we can add, please tell us.
MySQL Replication

Whether you’re new to MySQL replication or have been using it for some time, you will find this new book useful. It will help you actually to understand MySQL replication so you can keep it running. It’s especially useful when replication stops and you can’t get it started again.
