mysql mathematical functions include: 1. Absolute value function [ABS(X)] and function that returns pi [PI(X)]; 2. Square root function [SQRT(X)] and remainder function [MOD (X,Y)]; 3. Functions to obtain random numbers [RAN()] and [RAND(X)].
mysql mathematical functions include:
1, absolute value function ABS(X) and function PI that returns pi (X)
ABS(X) returns the absolute value of X
PI() returns the value of pi, which is displayed by default Bit
2, square root function SQRT(X) and remainder function MOD(X,Y)
SQRT(X) returns the second of a non-negative number x Square root
Find the remainder MOD(X,Y) returns the remainder of X/Y. MOD() also works for values with small parts. It returns is the exact remainder after the operation.
## 3. The function CEIL (X), CEILING (x), and Floor (x)
Ceil ( X) has the same meaning as CEILING(X). It returns the smallest integer value that is not less than X, and the return value is converted into a BIGINT
FLOOR(X) returns the largest integer value that is not greater than
round(x) rounds the X value
EXP(X) is to calculate the power of e
8. There is no need to explain the logarithmic functions LOG(X) and LOG10(X)
9. Functions RADIANS(X) and DEGREES(X) that convert angles and radians to each other
DEGREES(X) is to convert radians into angles
10, sine and arcsine functions SIN( X) and ASIN(X)
11, cosine function COS(X) and inverse cosine function ACOS(X)
12. Tangent, arctangent, and cotangent functions
Related learning recommendations: mysql video tutorial
The above is the detailed content of What are the mathematical functions of MySQL?. For more information, please follow other related articles on the PHP Chinese website!