---
title: "! (bang sign) operator"
description: Learn the syntax of the ! (bang sign) operator of the SQL language in Databricks SQL.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/bangsign
---

# `!` (bang sign) 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 the logical `NOT` of a Boolean expression. This operator is a synonym for [`not` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/not.md).

## Syntax

```
!expr
```

## Arguments

* `expr`: A `BOOLEAN` expression.

## Returns

A BOOLEAN.

## Examples

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

## Related functions

* [`and` predicate](https://docs.databricks.com/aws/en/sql/language-manual/functions/and.md)
* [`or` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/or.md)
* [`not` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/not.md)
