apache > db
Apache DB Project
 
Font size:      

SQRT

SQRT

Returns the square root of a floating point number; only the built-in types REAL, FLOAT, and DOUBLE PRECISION are supported. The return type for SQRT is the type of the parameter.

Note:
To execute SQRT on other data types, you must cast them to floating point types.

Syntax

SQRT(FloatingPointExpression)

Example

-- throws an exception if any row stores a negative number:
VALUES SQRT(3421E+09)
 
-- returns the square root of an INTEGER after casting it as a
-- floating point data type:
SELECT SQRT(myDoubleColumn) FROM MyTable
 
VALUES SQRT (CAST(25 AS FLOAT));


Previous Page
Next Page
Table of Contents
Index