> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# coalesce

> Returns the first non-NULL expression among the input parameters.

Returns the first non-NULL expression among the input parameters. Returns NULL if non-NULL expressions cannot be found.

## Syntax

```Haskell theme={null}
coalesce(expr1,...);
```

## Parameters

`expr1`: the input expressions, which must evaluate to compatible data types.

## Return value

The return value has the same type as `expr1`.

## Examples

```Plain Text theme={null}
mysql> select coalesce(3,NULL,1,1);
+-------------------------+
| coalesce(3, NULL, 1, 1) |
+-------------------------+
|                       3 |
+-------------------------+
1 row in set (0.00 sec)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.