BITNOT

Updated at:

This topic describes how to use the BITNOT function to perform a bitwise NOT operation.

BITNOT returns the bitwise NOT of an integer. Both the input and output are of the INT type.

Limits

Supported in Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 3.0.0 or later.

Syntax

INT BITNOT(INT number)

The input and return value are both of the INT type.

Input parameters

Parameter Data type
number INT

Example

  • Test data

    a (INT)
    7
  • Test statement

    SELECT BITNOT(a) AS var1
    FROM T1;
  • Test result

    var1 (INT)
    -8