Previous Next JavaScript must be enabled to correctly display this content

## degrees function

The `degrees` function converts the specified expression from radians to degrees.

Syntax:

    double degrees(n)

Semantics:

- n: The argument n is expressed in radians. Here, n is an expression that resolves to a number.
- return type: double.
  - Returns a NULL value in the following cases:
    - n resolves to a NULL value
    - n does not resolve to a number
  - Returns NaN if n resolves to NaN.
  - Returns respective infinity if n resolves to positive/negative infinity.

Note:

The conversion from radians to degrees does not generally return an exact value. For example, consider the query:

`SELECT degrees(atan(sqrt(3))) AS ATAN60 FROM Archery`

The degrees to radians conversion results in: `{"ATAN60":59.99999999999999}`

Example 12-79 degrees function

    SELECT degrees(n) FROM Archery

Value of n | Output
--- | ---
pi()/2 | 90
0 | 0.0