ADD
All functions > MATH > ADD
Adds two numbers and returns their sum.
Syntax
ADD(number1: T, number2: T) → T sql
Type Parameters:
T: Numeric types: BIGINT, FLOAT, DOUBLE, DECIMAL (both args same type). Temporal: TIMESTAMP+INTERVAL, DATE+INTERVAL
Arguments
| Parameter | Type | Required | Description |
|---|---|---|---|
number1 | T | Yes | First number to add |
number2 | T | Yes | Second number to add |
Returns
Same as input type - BIGINT, FLOAT, DOUBLE, or DECIMAL. For temporal: TIMESTAMP + INTERVAL → TIMESTAMP, DATE + INTERVAL → TIMESTAMP
Notes
- Both arguments must be of the same numeric type
- For temporal types, supports adding intervals to dates/timestamps
- Returns NULL if either operand is NULL
- Can be chained:
(1).ADD(2).ADD(3) - Operator form:
number1 + number2 - Overflow behavior depends on the underlying SQL engine