Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

MySQL INVERT BITS operator

INVERT BITS operator

MySQL Invert bits operator returns an unsigned 64-bit integer. It inverts all bits.

Syntax:

~

Example:

Code:

SELECT  6 & ~2;

Explanation

The above MySQL statement will return an unsigned integer for specified numbers.

Sample Output:

mysql> SELECT 6 & ~2;
+--------+
| 6 & ~2 |
+--------+
|      4 | 
+--------+
1 row in set (0.02 sec)

Previous: BITWISE AND
Next: BITWISE OR