- Categories:
Numeric functions (Trigonometric)
DEGREES¶
Converts radians to degrees.
Syntax¶
DEGREES( <input_expr> )
Arguments¶
input_exprThe value or expression to operate on. The data type must be FLOAT or DECFLOAT.
Returns¶
If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.
Examples¶
Show the number of degrees for 1/3 of a radian, 1 radian, and 3 radians:
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 | +-----------------+---------------+-------------------+--------------+