SQRT

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the square root of a number.

Syntax 

1sqrt(<x>)

Arguments 

Required 

  • <x>: The value to evaluate.

Returns 

Returns the square root as a double precision value.

Considerations 

  • sqrt returns an error for negative arguments. To compute the root of a negative number, use cbrt, which accepts negative values.

Examples 

Get a Square Root 

Compute the square root of a value.

1SELECT sqrt(2.0) AS result;

Returns 1.4142135623731.

Square Root of a Perfect Square 

1SELECT sqrt(4) AS result;

Returns 2.

Related Documentation