Skip to main content

BITNOT

Description

Used to perform a bitwise inversion operation on an integer.

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

Syntax

BITNOT( <x>)

Parameters

parameterdescription
<x>Integer operations

Return Value

Returns the result of the NOT operation of one integer.

Examples

select BITNOT(7), BITNOT(-127);
+-------+----------+
| (~ 7) | (~ -127) |
+-------+----------+
| -8 | 126 |
+-------+----------+