# SQRT

Returns the square root of a given number, accurate to within the representation of doubles.

## Syntax

```sql
SQRT ( number )

```

## Arguments

* expression: any valid numeric expression.

## Return Type

Float or double. If number is is zero, returns 0. If less than 0, returns `NULL`.

## Examples

```sql
SELECT SQRT(-2);

```

```output

+----------+
| SQRT(-2) |
+----------+
|     NULL |
+----------+

```

```sql
SELECT SQRT(2);

```

```output

+--------------------+
| SQRT(2)            |
+--------------------+
| 1.4142135623730951 |
+--------------------+
```

```sql
SELECT SQRT(4);

```

```output

+---------+
| SQRT(4) |
+---------+
|       2 |
+---------+
```

***

Modified at: February 24, 2023

Source: [/db/v9.1/reference/sql-reference/numeric-functions/sqrt/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/numeric-functions/sqrt/)

(An index of the documentation is available at /llms.txt)
