BITNOT
Description
Performs a bitwise NOT operation on an integer.
Supported integer types: TINYINT, SMALLINT, INT, BIGINT, LARGEINT.
Syntax
BITNOT(<x>)
Parameters
<x>
: The integer to perform the operation on.
Return Value
Returns the result of the bitwise NOT operation on the integer.
Examples
- Example 1
select BITNOT(7), BITNOT(-127);
+-----------+--------------+
| BITNOT(7) | BITNOT(-127) |
+-----------+--------------+
| -8 | 126 |
+-----------+--------------+ - NULL argument
select BITNOT(NULL);
+--------------+
| BITNOT(NULL) |
+--------------+
| NULL |
+--------------+