Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the mathematical functions of SQL Server

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what SQL Server mathematical functions have, which has a certain reference value, friends who need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Transact-SQL contains a number of mathematical functions that can be used with SQL Server.

The following scalar functions can be used in SQL Server 2012 and later. Most of these functions accept one or more parameters and will return a numeric value based on the parameters provided.

ABS ()

Returns the absolute (positive) value of the specified numeric expression. In other words, it allows you to determine whether the number is positive, negative or zero.

ACOS ()

Returns the inverse cosine. In other words, it returns the angle in radians, and the cosine value is the specified floating-point expression.

ASIN ()

Return to the arcsine. In other words, it returns the angle in radians, whose sine is the specified floating-point expression.

ATAN ()

Returns the inverse tangent. In other words, it returns the angle in radians, and its tangent is the specified floating-point expression.

ATN2 ()

Returns the angle (in radians) between the positive x axis and the ray from the origin to the point (y), where x and y are the values of the two specified float expressions.

CEILING ()

Allows you to round a number to the nearest integer. It returns the smallest integer greater than or equal to the specified numeric expression.

COS ()

Returns the triangular cosine of the specified angle in the specified expression, in radians.

COT ()

Returns the triangular cotangent value (in radians) of the specified angle in the specified float value expression.

DEGREES ()

Let's convert from radians to degrees. Specifically, this function returns the corresponding angle, in degrees, at the angle specified in radians.

EXP ()

Returns the index value of the specified float expression.

FLOOR ()

Can be rounded down to the nearest integer. It returns the largest integer less than or equal to the specified numeric expression.

LOG ()

Returns the natural logarithm of the specified float expression.

LOG10 ()

Returns the base 10 logarithm of the specified float expression.

PI ()

Returns the constant value of PI.

POWER ()

Returns the value of the specified expression to the specified power.

RADIANS ()

Allows you to convert degrees to radians. Specifically, it returns radians when entering a numeric expression in degrees.

RAND ()

Returns a pseudo-random floating-point value from 0 to 1, excluding.

ROUND ()

Returns a numeric value rounded to the specified length or precision.

SIGN ()

Returns the positive (+ 1), zero (0), or negative (- 1) symbol of the specified expression.

SIN ()

Returns the triangular sine of the specified angle (in radians) and an approximate numeric floating-point expression.

SQRT ()

Returns the square root of the specified float value.

SQUARE ()

Returns the square of the specified float value.

TAN ()

Returns the tangent of the input expression.

All functions except RAND () are deterministic. This means that each time they are called with a specific set of input values, they return the same result. RAND () is deterministic only when a child parameter is specified.

Thank you for reading this article carefully. I hope the editor will share the contents of SQL Server mathematical functions that are helpful to everyone. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report