Transact-SQL 参考

DEGREES

当给出以弧度为单位的角度时,返回相应的以度数为单位的角度。

语法

DEGREES ( numeric_expression )

参数

numeric_expression

精确数字或近似数字数据类型类别的表达式(bit 数据类型除外)。

返回代码值

返回与 numeric_expression 相同的类型。

示例

下例以 PI/2 弧度的角度返回度数。

SELECT 'The number of degrees in PI/2 radians is: ' + 
CONVERT(varchar, DEGREES((PI()/2)))
GO

下面是结果集:

The number of degrees in PI/2 radians is 90       

(1 row(s) affected)

请参见

数学函数