# subtract — DuckDB 1.5.5

No description supplied by the engine.

- Reference: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/
- JSON: /products/haybarn/functions/api/v1/duckdb-1.5.5/functions/subtract.json
- Snapshot ID: duckdb-1.5.5
- Engine: duckdb v1.5.5
- Source ID: d8cdaa33fd
- Binary SHA-256: 8463eb26527b278109cfddffc4606e1019ebefcfe2eac75efc53c76ed8f282d5
- Captured: 2026-09-05T18:37:40.699Z
- Source: https://github.com/duckdb/duckdb/releases/tag/v1.5.5
- Loaded extensions: autocomplete, core_functions, icu, json, parquet, shell
- Alias of: -

## Interpretation

- Choose a snapshot matching the target engine and build. The default is captured from the published Haybarn WASM package used by the browser playground. Historical native snapshots are also available.
- Availability is an observation in the recorded build and extension profile, not a guarantee of support in every installation or in WASM.
- Types and descriptions are declarations from duckdb_functions(). Binding can specialize result types. Null means not supplied by the catalog; do not invent defaults, optionality, argument mode, or table output columns.
- Raw parameter arrays preserve catalog order for scalar/aggregate/macro functions. Raw table arguments are alphabetical. Use callingConvention for engine-confirmed positional order and named arguments; null modes are unrecorded. Named does not mean optional. Macro defaults and special named variadic behavior are not supplied by duckdb_functions().
- Catalog examples are source material and may require data or extensions. runnableExamples contains separately verified SQL for the pinned WASM package; sample-data adaptations and guide examples are labeled separately.
- Guide annotations and recipes are separate editorial content. The browser runner always uses Haybarn WASM 1.5.5-rc3, independently of the documentation snapshot.
- All URLs beginning with / are relative to the origin hosting this document. Exports require no JavaScript, cookies, API key, or browser engine.

## Overloads

### overload-8dc15441fceaa8b0

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: BIGINT) → BIGINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-8dc15441fceaa8b0

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | BIGINT | not recorded |

Declared return type: BIGINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-47ba5392cbfee6f9

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: BIGNUM) → BIGNUM
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-47ba5392cbfee6f9

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | BIGNUM | not recorded |

Declared return type: BIGNUM. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-15a7a923a1c769b8

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DECIMAL) → DECIMAL
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-15a7a923a1c769b8

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DECIMAL | not recorded |

Declared return type: DECIMAL. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-8097bf052252276b

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DOUBLE) → DOUBLE
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-8097bf052252276b

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DOUBLE | not recorded |

Declared return type: DOUBLE. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-39b2309760995213

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: FLOAT) → FLOAT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-39b2309760995213

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | FLOAT | not recorded |

Declared return type: FLOAT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-83a6a74c199c3971

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: HUGEINT) → HUGEINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-83a6a74c199c3971

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | HUGEINT | not recorded |

Declared return type: HUGEINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-a83e89d72a2bd526

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: INTEGER) → INTEGER
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-a83e89d72a2bd526

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | INTEGER | not recorded |

Declared return type: INTEGER. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-c57dfc8543983061

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: INTERVAL) → INTERVAL
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-c57dfc8543983061

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | INTERVAL | not recorded |

Declared return type: INTERVAL. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-ceeac6187f8afebe

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: SMALLINT) → SMALLINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-ceeac6187f8afebe

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | SMALLINT | not recorded |

Declared return type: SMALLINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-412c385cbe9c1130

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TINYINT) → TINYINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-412c385cbe9c1130

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TINYINT | not recorded |

Declared return type: TINYINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-553ebd320b042108

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UBIGINT) → UBIGINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-553ebd320b042108

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UBIGINT | not recorded |

Declared return type: UBIGINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-0ed515522a6e2823

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UHUGEINT) → UHUGEINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-0ed515522a6e2823

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UHUGEINT | not recorded |

Declared return type: UHUGEINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-d983c356a43ffd46

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UINTEGER) → UINTEGER
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-d983c356a43ffd46

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UINTEGER | not recorded |

Declared return type: UINTEGER. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-456814f18a7712f6

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: USMALLINT) → USMALLINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-456814f18a7712f6

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | USMALLINT | not recorded |

Declared return type: USMALLINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-b162843ecc9c9665

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UTINYINT) → UTINYINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-b162843ecc9c9665

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UTINYINT | not recorded |

Declared return type: UTINYINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-55264d9656cbfe7a

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: BIGINT, col1: BIGINT) → BIGINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-55264d9656cbfe7a

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | BIGINT | not recorded |
| col1 | BIGINT | not recorded |

Declared return type: BIGINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-0f0464833c891c66

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: BIGNUM, col1: BIGNUM) → BIGNUM
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-0f0464833c891c66

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | BIGNUM | not recorded |
| col1 | BIGNUM | not recorded |

Declared return type: BIGNUM. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-54d6db1b94b6a945

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DATE, col1: DATE) → BIGINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-54d6db1b94b6a945

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DATE | not recorded |
| col1 | DATE | not recorded |

Declared return type: BIGINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-5d47b3b21cce8584

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DATE, col1: INTEGER) → DATE
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-5d47b3b21cce8584

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DATE | not recorded |
| col1 | INTEGER | not recorded |

Declared return type: DATE. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-0dafd9756399255a

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DATE, col1: INTERVAL) → TIMESTAMP
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-0dafd9756399255a

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DATE | not recorded |
| col1 | INTERVAL | not recorded |

Declared return type: TIMESTAMP. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-8e2cb1b8fde6a0e6

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DECIMAL, col1: DECIMAL) → DECIMAL
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-8e2cb1b8fde6a0e6

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DECIMAL | not recorded |
| col1 | DECIMAL | not recorded |

Declared return type: DECIMAL. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-721bdb3441d89371

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: DOUBLE, col1: DOUBLE) → DOUBLE
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-721bdb3441d89371

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | DOUBLE | not recorded |
| col1 | DOUBLE | not recorded |

Declared return type: DOUBLE. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-73931f9b950dba4b

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: FLOAT, col1: FLOAT) → FLOAT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-73931f9b950dba4b

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | FLOAT | not recorded |
| col1 | FLOAT | not recorded |

Declared return type: FLOAT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-88dec8cb26771c04

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: HUGEINT, col1: HUGEINT) → HUGEINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-88dec8cb26771c04

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | HUGEINT | not recorded |
| col1 | HUGEINT | not recorded |

Declared return type: HUGEINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-e333ad9c2073bc26

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: INTEGER, col1: INTEGER) → INTEGER
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-e333ad9c2073bc26

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | INTEGER | not recorded |
| col1 | INTEGER | not recorded |

Declared return type: INTEGER. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-4b45a2e2a60197c3

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: INTERVAL, col1: INTERVAL) → INTERVAL
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-4b45a2e2a60197c3

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | INTERVAL | not recorded |
| col1 | INTERVAL | not recorded |

Declared return type: INTERVAL. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-478a2423c135148b

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: SMALLINT, col1: SMALLINT) → SMALLINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-478a2423c135148b

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | SMALLINT | not recorded |
| col1 | SMALLINT | not recorded |

Declared return type: SMALLINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-44572736877cb1c5

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TIME WITH TIME ZONE, col1: INTERVAL) → TIME WITH TIME ZONE
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-44572736877cb1c5

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TIME WITH TIME ZONE | not recorded |
| col1 | INTERVAL | not recorded |

Declared return type: TIME WITH TIME ZONE. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-26547df7f3042973

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TIME, col1: INTERVAL) → TIME
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-26547df7f3042973

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TIME | not recorded |
| col1 | INTERVAL | not recorded |

Declared return type: TIME. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-de0c7df9bc413c9d

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TIMESTAMP, col1: INTERVAL) → TIMESTAMP
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-de0c7df9bc413c9d

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TIMESTAMP | not recorded |
| col1 | INTERVAL | not recorded |

Declared return type: TIMESTAMP. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-6a17ea03015e1dcd

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TIMESTAMP, col1: TIMESTAMP) → INTERVAL
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-6a17ea03015e1dcd

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TIMESTAMP | not recorded |
| col1 | TIMESTAMP | not recorded |

Declared return type: INTERVAL. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-e3e6b57b1be296f8

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: TINYINT, col1: TINYINT) → TINYINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-e3e6b57b1be296f8

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | TINYINT | not recorded |
| col1 | TINYINT | not recorded |

Declared return type: TINYINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-b1be1a2ca2bf006a

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UBIGINT, col1: UBIGINT) → UBIGINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-b1be1a2ca2bf006a

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UBIGINT | not recorded |
| col1 | UBIGINT | not recorded |

Declared return type: UBIGINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-df298502557465c7

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UHUGEINT, col1: UHUGEINT) → UHUGEINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-df298502557465c7

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UHUGEINT | not recorded |
| col1 | UHUGEINT | not recorded |

Declared return type: UHUGEINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-4dd05e530963cbfa

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UINTEGER, col1: UINTEGER) → UINTEGER
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-4dd05e530963cbfa

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UINTEGER | not recorded |
| col1 | UINTEGER | not recorded |

Declared return type: UINTEGER. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-762f3a105d901117

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: USMALLINT, col1: USMALLINT) → USMALLINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-762f3a105d901117

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | USMALLINT | not recorded |
| col1 | USMALLINT | not recorded |

Declared return type: USMALLINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.

### overload-79555485f36301a5

Kind: scalar. Parameter order: catalog-order.

```text
subtract(col0: UTINYINT, col1: UTINYINT) → UTINYINT
```

Link: /products/haybarn/functions/releases/duckdb-1.5.5/subtract/#overload-79555485f36301a5

| Argument | Catalog type | Calling mode |
| --- | --- | --- |
| col0 | UTINYINT | not recorded |
| col1 | UTINYINT | not recorded |

Declared return type: UTINYINT. Variadic argument type: none declared.
Stability: CONSISTENT. Declared side effects: false.


## Guide recipes

No guide recipes.

## Engine catalog examples

Source examples may require additional data or extensions. Expressions are wrapped in SELECT; execution verification is not recorded.

No catalog examples.

## Additional DuckDB documentation

- [Numeric Functions](https://duckdb.org/docs/current/sql/functions/numeric#subtractx-y)

## Observed availability

| Snapshot | Observed | Overloads | JSON |
| --- | --- | --- | --- |
| haybarn-1.5.5-rc3 | present | 37 | [reference](/products/haybarn/functions/api/v1/haybarn-1.5.5-rc3/functions/subtract.json) |
| duckdb-1.5.5 | present | 37 | [reference](/products/haybarn/functions/api/v1/duckdb-1.5.5/functions/subtract.json) |
| duckdb-1.4.4 | present | 37 | [reference](/products/haybarn/functions/api/v1/duckdb-1.4.4/functions/subtract.json) |
| duckdb-1.3.2 | present | 35 | [reference](/products/haybarn/functions/api/v1/duckdb-1.3.2/functions/subtract.json) |

Engine catalog documentation is derived from MIT-licensed Haybarn and DuckDB. [Notices](/third-party-notices.txt).
