未加星标

SQL Server Mathematical Functions (Full List)

字体大小 | |
[数据库(mssql) 所属分类 数据库(mssql) | 发布者 店小二03 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

Transact-SQL contains a number of mathematical functions that you can use withSQL Server.

The following scalar functions can be used in SQL Server 2012 and above. Most of these functions accept one or more arguments, and will return a numeric value based on the argument/s supplied.

ABS() Returns the absolute (positive) value of the specified numeric expression. In other words, it allows you to determine whether a number is positive, negative, or zero. ACOS() Returns the arccosine. In other words, it returns the angle, in radians, whose cosine is the specified float expression. ASIN() Returns the arcsine. In other words, it returns the angle, in radians, whose sine is the specified float expression. ATAN() Returns the arctangent. In other words, it returns the angle, in radians, whose tangent is a specified float expression. ATN2() Returns the angle, in radians, between the positive x-axis and the ray from the origin to the point (y, x), where x and y are the values of the two specified float expressions. CEILING() Allows you to round a number up to the nearest integer. It returns the smallest integer greater than, or equal to, the specified numeric expression. COS() Returns the trigonometric cosine of the specified angle measured in radians in the specified expression. COT() Returns the trigonometric cotangent of the specified angle in radians in the specified float expression. DEGREES() Let’s you convert from radians to degrees. Specifically, this function returns the corresponding angle, in degrees, for an angle specified in radians. EXP() Returns the exponential value of the specified float expression. FLOOR() Lets you round 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() Lets you convert from degrees to radians. Specifically, it returns radians when a numeric expression, in degrees, is entered. RAND() Returns a pseudo-random float value from 0 through 1, exclusive. ROUND() Returns a numeric value, rounded to the specified length or precision. SIGN() Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. SIN() Returns the trigonometric sine of the specified angle, in radians, and in an approximate numeric, float, 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 for RAND() are deterministic. This means they return the same results each time they are called with a specific set of input values. RAND() is deterministic only when a seed parameter is specified.

本文数据库(mssql)相关术语:熊片数据库 mssql数据库 oracle数据库 pubmed数据库 access数据库 万方数据库

代码区博客精选文章
分页:12
转载请注明
本文标题:SQL Server Mathematical Functions (Full List)
本站链接:https://www.codesec.net/view/610949.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mssql) | 评论(0) | 阅读(81)