Previous Next JavaScript must be enabled to correctly display this content

## square root function

The `sqrt` function returns the square root of the specified expression.

Syntax:

    double sqrt(n)

Semantics:

- n: The argument 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 in the following cases:
    - n resolves to NaN
    - n is less than zero
  - Returns positive infinity if n resolves to positive infinity.
  - Returns the same value as the argument, if n resolves to positive/negative zero.

Example 12-93 square root function

    SELECT sqrt(n) FROM Archery

Value of n | Output
--- | ---
16 | 4.0
12.57/pi() | 2.00028879648171