# COALESCE

The `COALESCE()` function returns the first non-NULL value for a given list of values.

## Syntax

```
COALESCE ( val, [val, [val ...]])

```

## Arguments

* val: any object

## Return Type

Return the first non-NULL value in the list. Returns NULL if all values are NULL.

## Examples

```sql
SELECT COALESCE(NULL, NULL, 1, 2, 3);

```

```output

+-------------------------------+
| COALESCE(NULL, NULL, 1, 2, 3) |
+-------------------------------+
|                             1 |
+-------------------------------+

```

***

Modified at: June 29, 2026

Source: [/db/v9.1/reference/sql-reference/conditional-functions/coalesce/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/conditional-functions/coalesce/)

(An index of the documentation is available at /llms.txt)
