Skip to main content

bitnot

bitnot

Description

Syntax:

BITNOT(Integer-type value)

This function returns the result of NOT operation of two integers.

Integer range: TINYINT、SMALLINT、INT、BIGINT、LARGEINT

Example

mysql> select bitnot(7) ans;
+------+
| ans |
+------+
| -8 |
+------+

mysql> select bitxor(-127) ans;
+------+
| ans |
+------+
| 126 |
+------+

Keywords

BITNOT