MULTIPLY
All functions > MATH > MULTIPLY
Returns the product of two numbers.
Signatures
Numeric multiplication
Returns: Product of the two numbers
MULTIPLY(number1: T, number2: T) → T sql
| Parameter | Type | Required | Description |
|---|---|---|---|
number1 | T | Yes | First number to multiply |
number2 | T | Yes | Second number to multiply |
Notes
- Both arguments must be of the same numeric type
- Returns NULL if either operand is NULL
- Multiplication is commutative:
a * b = b * a - Operator form:
number1 * number2 - Overflow behavior depends on the underlying SQL engine
- Zero multiplied by any number results in zero
See also
Examples
FeatureQL
SELECT
f1 := MULTIPLY(3, 4), -- Basic multiplication
f2 := MULTIPLY(7, 8), -- Another multiplication
f3 := MULTIPLY(-5, 2), -- Negative number
f4 := MULTIPLY(0, 100), -- Multiply by zero
f5 := MULTIPLY(1.5, 3.0), -- Decimal multiplication
f6 := MULTIPLY(1.5e0, 3.0e0) -- Double multiplication with precision
;Result
| f1 BIGINT | f2 BIGINT | f3 BIGINT | f4 BIGINT | f5 VARCHAR | f6 VARCHAR |
|---|---|---|---|---|---|
| 12 | 56 | -10 | 0 | 4.5 | 4.5 |