SQL Math function

Source: Internet
Author: User
Tags convert radians to degrees integer natural logarithm square root

The math functions are shown in the following table:

Function Parameters Function
ASIN, ACOS, Atan (float_expr) To find the float_expr string, the inverse cosine, the anyway tangent
ATN2 (FLOAT_EXPR1,FLOAT_EXPR2) For FLOAT_EXPR1/FLOAT_EXPR2 's sake cut
SIN, COS, TAN, COT (float_expr) To find the sine, cosine and tangent of float_expr
DEGREES (numeric_expr) Convert radians to degrees
RADIANS (numeric_expr) Convert degrees to radians
Exp (float_expr) To find the exponential value of float_expr
Power (numeric_expr,y) To ask for the Y-numeric_expr of the second party
SQRT (float_expr) To find the square root of float_expr
LOG (float_expr) To find the natural logarithm of float_expr
Logio (float_expr) Find the logarithm of the float_expr with a 10 base
Abs (numeric_expr) To find the absolute value of numeric_expr
Geiling (numeric_expr) Returns the smallest integer greater than or equal to numeric_expr
FLOOR (numeric_expr) Returns the largest integer less than or equal to numeric_expr
RAND ({seed}) Returns a random floating-point number from 0 to 1, possibly using an integer expression to specify its initial value
Pi () return constant 3.141592653589793
ROUND (numeric_expr,length) Rounds the value after the numeric_expr decimal point, leaving the number of decimal digits to length
SIGN (numeric_expr) Returns 1, 0,-1 values when the numeric_expr value is positive, 0, or negative

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.