- 类别:
数值函数 (三角函数)
DEGREES¶
将弧度转换为度。
语法¶
DEGREES( <input_expr> )
实参¶
input_exprThe value or expression to operate on. The data type must be FLOAT or DECFLOAT.
返回¶
If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.
示例¶
显示 1/3 弧度、1 弧度和 3 弧度的度数:
SELECT DEGREES(PI()/3), DEGREES(PI()), DEGREES(3 * PI()), DEGREES(1); +-----------------+---------------+-------------------+--------------+ | DEGREES(PI()/3) | DEGREES(PI()) | DEGREES(3 * PI()) | DEGREES(1) | |-----------------+---------------+-------------------+--------------| | 60 | 180 | 540 | 57.295779513 | +-----------------+---------------+-------------------+--------------+