> This page location: Conditional Expressions & Operators > ISNULL
> Full Neon documentation index: https://neon.com/docs/llms.txt

# PostgreSQL ISNULL

SQL Server supports [`ISNULL`](http://www.sqlservertutorial.net/sql-server-system-functions/sql-server-isnull-function/) function that replaces `NULL` with a specified replacement value:

```sql
ISNULL(expression, replacement)
```

If the `expression` is NULL, then the `ISNULL` function returns the `replacement`. Otherwise, it returns the result of the `expression`.

PostgreSQL does not have the `ISNULL` function. However, you can use the [`COALESCE`](https://neon.com/postgresql/postgresql-tutorial/postgresql-coalesce) function which provides similar functionality.

Note that the `COALESCE` function returns the first non-null argument, so the following syntax has a similar effect as the `ISNULL` function above:

```sql
COALESCE(expression,replacement)
```

For the `COALESCE` example, check out the [`COALESCE`](https://neon.com/postgresql/postgresql-tutorial/postgresql-coalesce) function tutorial.

In addition to `COALESCE` function, you can use the [`CASE`](https://neon.com/postgresql/postgresql-tutorial/postgresql-case) expression:

```sql
SELECT
    CASE WHEN expression IS NULL
            THEN replacement
            ELSE expression
    END AS column_alias;
```

Check out the [`CASE`](https://neon.com/postgresql/postgresql-tutorial/postgresql-case) expression tutorial for more information.

---

## Related docs (Conditional Expressions & Operators)

- [CASE](https://neon.com/postgresql/postgresql-tutorial/postgresql-case)
- [COALESCE](https://neon.com/postgresql/postgresql-tutorial/postgresql-coalesce)
- [NULLIF](https://neon.com/postgresql/postgresql-tutorial/postgresql-nullif)
- [CAST](https://neon.com/postgresql/postgresql-tutorial/postgresql-cast)
