SQRT()

Documentation

VoltDB Home » Documentation » Using VoltDB

SQRT()

SQRT() — Returns the square root of a numeric expression.

Synopsis

SQRT( numeric-expression )

Description

The SQRT() function returns the square root of the specified numeric expression.

Example

The following example uses the SQRT and POWER functions to return the distance of a graph point from the origin.

SELECT location, x, y, 
       SQRT(POWER(x,2) + POWER(y,2)) AS distance
       FROM points ORDER BY location;
>