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

ParameterTypeRequiredDescription
number1TYesFirst number to add
number2TYesSecond 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

See also

Examples

Last update at: 2025/10/13 10:23:46