SQR()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the square of a number.
USAGE
SQR(number)
Argument Name | Description |
|---|---|
| The number to transform |
DETAILS
SQR()is a mathematical function that returns the square of a number.
Calling SQR(x) is equivalent to calling POWER(x, 2) or the expression x * x.
The return value must fit within the DOUBLE data type or an error is generated.
A NULL is returned if the argument is NULL.
EXAMPLES
SELECT SQR(2), SQR(-5);
+--------+---------+
| SQR(2) | SQR(-5) |
+--------+---------+
| 4 | 25 |
+--------+---------+
