---
title: + (plus sign) operator
description: Learn the syntax of the + (plus sign) operator of the SQL language in Databricks SQL.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/plussign
---

# `+` (plus sign) operator

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns the sum of `expr1` and `expr2`.

## Syntax

```
expr1 + expr2
```

## Arguments

* `expr1`: A numeric, DATE, TIME, TIMESTAMP, or INTERVAL expression.
* `expr2`: If `expr1` is a numeric `expr2` must be numeric expression, or an INTERVAL otherwise.

## Returns

* If `expr1` is a numeric, the common maximum type of the arguments.
* If `expr1` is a DATE and `expr2` is a day-time interval the result is a TIMESTAMP.
* If `expr1` is a TIME and `expr2` is a day-time interval the result is a TIME with the wider precision of the two operands. If the result falls outside `[00:00:00, 24:00:00)`, Databricks raises [DATETIME\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/error-classes.md#datetime_overflow).
* If `expr1` and `expr2` are year-month intervals the result is a year-month interval of sufficiently wide units to represent the result.
* If `expr1` and `expr2` are day-time intervals the result is a day-time interval of sufficiently wide units to represent the result.
* Otherwise, the result type matches `expr1`.

If both expressions are interval they must be of the same class.

When you add a year-month interval to a DATE, Databricks ensures that the resulting date is well formed.

If the result overflows the result type, Databricks raises an [ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/arithmetic-overflow-error-class.md) or [INTERVAL\_ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/interval-arithmetic-overflow-error-class.md) error.

Use [try\_add](https://docs.databricks.com/aws/en/sql/language-manual/functions/try_add.md) to return `NULL` on overflow.

> [!WARNING]
>
> In Databricks Runtime, if [spark.sql.ansi.enabled](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-ansi-compliance.md) is `false`, an overflow does not cause an error but "wraps" the result instead.

## Common error conditions

* [ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/arithmetic-overflow-error-class.md)
* [INTERVAL\_ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/interval-arithmetic-overflow-error-class.md)

## Examples

```sql
> SELECT 1 + 2;
 3

> SELECT DATE'2021-03-20' + INTERVAL '2' MONTH
 2021-5-20

> SELECT TIMESTAMP'2021-03-20 12:15:29' + INTERVAL '3' SECOND
 2021-03-20 12:15:32

> SELECT TIME'10:30:00' + INTERVAL '2' HOUR
 12:30:00

> SELECT typeof(INTERVAL '3' DAY + INTERVAL '2' HOUR)
 interval day to hour

> SELECT DATE'2021-03-31' + INTERVAL '1' MONTH;
 2021-04-30

> SELECT 127Y + 1Y;
 Error: ARITHMETIC_OVERFLOW
```

## Related functions

* [`*` (asterisk sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/asterisksign.md)
* [`-` (minus sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/minussign.md)
* [`/` (slash sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/slashsign.md)
* [`sum` aggregate function](https://docs.databricks.com/aws/en/sql/language-manual/functions/sum.md)
* [`try_add` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/try_add.md)
* [`try_divide` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/try_divide.md)
