MySQL SQRT() Function
In MySQL, the SQRT() function returns the square root of a nonnegative number.
SQRT() Syntax
Here is the syntax of MySQL SQRT() function:
SQRT(number)
Parameters
number- Required. A nonnegative number.
Return value
In MySQL, the SQRT() function returns the square root of a nonnegative number.
The SQRT() function will return NULL if the argument number is negative or NULL.
SQRT() Examples
SELECT
SQRT(16),
SQRT(25),
SQRT(49),
SQRT(100),
SQRT(101),
SQRT(-100),
SQRT(NULL)\G
output
*************************** 1\. row ***************************
SQRT(16): 4
SQRT(25): 5
SQRT(49): 7
SQRT(100): 10
SQRT(101): 10.04987562112089
SQRT(-100): NULL
SQRT(NULL): NULL