3.4. Mathematical Functions¶
To comply with the SQL standard in all cases when a null
is passed as an
argument to any function below the result of the expression will be null
.
Values that are missing are treated as null
values.
3.4.1. ABS()
– Absolute value¶
Return the absolute value (positive value) of a number.
abs(<number>)
3.4.4. FLOOR()
– Round down¶
Remove the fractional part of a number. This is often refered to as truncating a number.
floor(<number>)
3.4.6. SQRT()
– Square root¶
Calculates the square root of a number.
sqrt(<number>)
If the number is negative an error will be thrown:
Cannot calculate square root with negative number -17