返回以弧度指定的角的相应角度。
适用范围:SQL Server(SQL Server 2008 至当前版本),Windows Azure SQL Database(初始版本至当前版本)。 |
语法
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)