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
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework