Arithmetic functions of transact-SQL

Source: Internet
Author: User

 

Arithmetic functions of transact-SQL
Function
Trigonometric function
Sin float_expression returns the sine of the angle in radians.
Cos float_expression returns the cosine of the angle in radians.
Tan float_expression returns the tangent of the angle in radians.
Cot float_expression returns the cotangent of the angle in radians.
Inverse trigonometric function
Asin float_expression returns the angle in radians where the sine is the float value.
ACOs float_expression returns the angle in radians where the cosine is the float value.
Continue table
Function
Atan float_expression returns the angle in radians of the float value.
Atan2 float_expression1
Float_expression2
Returns the tangent float_expression1/float_expression2.
Angle in radians
Angle radians conversion letter
Quantity
Degrees numeric_expression converts radians to degrees and returns the same data as the expressions.
The data type can be integer money real.
Float Type
Radians numeric_expression converts angle to radians and returns the same data as the expression.
The data type can be integer money real.
Float Type
Power Function
Exp float_expression returns the exponential value of the expression.
Log float_expression returns the natural logarithm of the expression.
Log10 float_expression returns the base-10 logarithm of the expression.
SQRT float_expression returns the square root of the expression
Approximate value function
Ceiling numeric_expression return> = data type returned by the smallest integer of the expression
The same as the expression can be integer money
Real Float Type
Floor numeric_expression return
< = Data type returned by the smallest integer of the expression
The same as the expression can be an integer.
money
real Float Type
round numeric_expression
integer_expression
returns the same data type as the expression returned by an integer expression.
the data type can be returned for the
integer money real Float Type
symbol function
ABS numeric_expression returns the absolute value of the expression. The data type returned for the expression is the same as that for the table
the dashboard can be integer money real
float Type
sign numeric_expression test parameter positive and negative returns 0 zero value 1 positive
Number or-1 negative return data type and expression
type can be integer money real
Float Type
other functions
the PI return value is 3.1415926535897936.
Rand [integer_expression] use the optional [integer_expression] As the seed value to get 0-
1 random floating point number

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.