SQRT()
Published Jun 2, 2023
Contribute to Docs
SQRT()
is a function in SQL that returns the square root of a number input. The square root of any given number is a value that multiplied by itself will result in the passed number.
Syntax
SQRT(number);
number
in this case should be any positive integer. For example, 144 as seen below.
Example
The square root of 144 is 12, as 12 multiplied by 12 equals 144. It is important to note, SQRT()
requires a positive number, and will always return a positive number.
SELECT SQRT(144);
Yields:
12
Note: SQRT() is compatible with different SQL database platforms such as MySQL, PostgreSQL, Oracle, and SQL Server.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.