---
title: not operator
description: Learn the syntax of the not function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/not
---

# `not` 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 logical negation of the argument. This operator is an alias for [`!` (bang sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/bangsign.md).

## Syntax

```
not expr
```

## Arguments

* `expr`: A BOOLEAN expression.

## Returns

A BOOLEAN.

## Examples

```sql
> SELECT not true;
 false
> SELECT not false;
 true
> SELECT  not NULL;
 NULL
```

## Related functions

* [`&` (ampersand sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/ampersandsign.md)
* [`|` (pipe sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/pipesign.md)
* [`!` (bang sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/bangsign.md)
