---
title: ~ (tilde sign) operator
description: Learn the syntax of the \~ (tilde sign) operator of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/tildesign
---

# `~` (tilde 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 bitwise `NOT` of `expr`.

## Syntax

```
~ expr
```

## Arguments

* `expr`: An integral numeric type expression.

## Returns

The result type matches the type of `expr`.

## Examples

```sql
> SELECT ~ 0;
 -1
```

## Related functions

* [`&` (ampersand sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/ampersandsign.md)
* [`bit_count` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/bit_count.md)
* [`bit_get` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/bit_get.md)
* [`^` (caret sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/caretsign.md)
* [`getbit` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/getbit.md)
* [`|` (pipe sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/pipesign.md)
