SQRT - Square Root in Teradata

SQRT is a Teradata extension to the ANSI SQL-99 standard.
It will compute the square root of the input supplied.


Functionality: SQRT (input)

General Syntax
SELECT SQRT (float fNumber)


Teradata expects the input as float otherwise it will convert internally by the rules. It will throw error if it cannot convert to float value (i.e. CHAR). Negative inputs will not be accepted.


SELECT SQRT(2)

Result: 1.41421356237309E+000



SELECT SQRT(1)

Result: 1



SELECT SQRT(4)

Result: 2



SELECT SQRT(-2)

Result: Error (Negative input)


You can use the above codes with SELECT statements for columns for which you want to calculate.

..