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

# bitnot

> 返回数值的按位取反结果。

返回参数 `x` 进行取反运算后的结果。

## 语法

```Haskell theme={null}
BITNOT(x);
```

## 参数说明

`x`: 支持的数据类型为 TINYINT、SMALLINT、INT、BIGINT、LARGEINT。

## 返回值说明

返回值的数据类型与 `x` 类型一致。

## 示例

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


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