MySQL functions-Math functions

Source: Internet
Author: User
Tags arithmetic mysql functions square root

Absolute value function abs ()

Pi (), decimal default 6 bits

Square root function sqrt ()

Find the remainder function mod (x, y)

Rounding up Ceil (x), CEILING (x)

Take down the entire floor (x)

Random number rand (), rand (x): Generates floating-point numbers between 0~1, with parameters equal to the random number produced by the same parameter

Rounding Round (x)

ROUND (x, y) retains the Y-bit after the decimal point, Y is negative, and the x value of the Y-bit left shift of the decimal point is preserved

Intercept function TRUNCATE (x, y) to the decimal point after the number of decimal digits, if Y is 0 to the part after the decimal point, if Y is negative, the value before the decimal point, replaced by 0

Symbol function sign (x) returns the symbol for x value, negative-1, 0-0, positive-1

Power Arithmetic function

POW (x, y), POWER (x, y) returns the Y-order of X

EXP (x) returns the X-second side of E

Logarithmic arithmetic functions

Log (x) returns the logarithm of x relative to E

LOG10 (x) returns the logarithm of the radix 10 of X

There are a few other functions:

Angle to Radian RADIANS (x)

Radian to Angle DEGREES (x)

sine function sin (x) inverse chord function ASIN (x)

cosine function COS (x) inverse cosine function ACOS (x)

Tangent function TAN (x) Anyway tangent illusion ATAN (x)

cotangent function COT (x)

MySQL functions-Math functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.