IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Math Functions
editMath Functions
editAll math and trigonometric functions require their input (where applicable) to be numeric.
Generic
edit-
ABS
Absolute value, returns \[same type as input]
SELECT ABS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
CBRT
Cube root, returns double
-
CEIL
Ceiling, returns double
-
CEILING
Same as CEIL
-
E
Euler’s number, returns 2.7182818284590452354
-
Round (
ROUND
)
This rounds "half up" meaning that ROUND(-1.5)
results in -1
.
-
Floor (
FLOOR
)
-
Natural logarithm (
LOG
)
SELECT LOG(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Logarithm base 10 (
LOG10
)
SELECT LOG10(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Square root (
SQRT
)
SELECT SQRT(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
ex (
EXP
)
SELECT EXP(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
ex - 1 (
EXPM1
)
SELECT EXP(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
Trigonometric
editSELECT DEGREES(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
SELECT DEGREES(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Sine (
SIN
)
SELECT SIN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Cosine (
COS
)
SELECT COS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Tangent (
TAN
)
SELECT TAN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Arc sine (
ASIN
)
SELECT ASIN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Arc cosine (
ACOS
)
SELECT ACOS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Arc tangent (
ATAN
)
SELECT ATAN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Hyperbolic sine (
SINH
)
SELECT SINH(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;
-
Hyperbolic cosine (
COSH
)
SELECT COSH(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no;