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.2. CEIL() – Round up

Round up to the next whole number.

ceil(<number>)

3.4.3. COS() – Cosine

Calculates the cosine of an angle.

cos(<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.5. SIN() – Sine

Calculates the sine of an angle.

sin(<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

3.4.7. TAN() – Tangent

Calculates the tangent of an angle.

tan(<number>)