BITNOT
Syntax
INT BITNOT(INT number)
Description
The BITNOT function is used to perform a bitwise NOT operation. The bitwise NOT operation inverts the binary bits of an integer, that is, 0 becomes 1 and 1 becomes 0. Because the INT type uses two's complement representation, the result after inversion must be understood according to the two's complement rules.
Input Parameters
| Parameter | Data Type |
|---|---|
| number | INT |
Example
CREATE TABLE source ( f_sequence INT ) WITH ( 'connector' = 'datagen', 'rows-per-second' = '1' ); CREATE TABLE print with( 'connector' = 'print' ) as select BITNOT (7) as int1 from source;
The returned result is -8, and the data type is INT.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot