/ [division]
All functions > MATH > / [division]
Divides the left-hand number by the right-hand number, producing a DOUBLE result.
Syntax
left / right · DIVIDE(left, right)
Notes
- Both operands are promoted for division; the result type is DOUBLE
- Returns NULL if either operand is NULL
- Division by zero is an error; use TRY_DIVIDE for a NULL result when the divisor may be zero
- For type-preserving division (including integer truncation), use DIVIDE_TYPE (
//)
Related Functions
Examples
/ — floating-point division
FeatureQL
SELECT
f1 := 10E0 / 3E0, -- Quotient as DOUBLE
f2 := 15E0 / 5E0 -- Exact division
;Result
| f1 VARCHAR | f2 VARCHAR |
|---|---|
| 3.3333333333333335 | 3.0 |
/ — edge cases
FeatureQL
SELECT
f1 := -8E0 / 4E0 -- Negative dividend
;Result
| f1 VARCHAR |
|---|
| -2.0 |