~

USAGE

~value

Value Name

Description

value

The value to bitwise negate

DETAILS

The ~ operator returns the negated value where each input bit is changed to its opposite digit.

A NULL is returned if the value is NULL.

The expression ~x behaves in exactly the same manner as the function call NOTBITS(x).

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT HEX(~7), HEX(~32767), HEX(~0);
+------------------+------------------+------------------+
| HEX(~7)          | HEX(~32767)      | HEX(~0)          |
+------------------+------------------+------------------+
| FFFFFFFFFFFFFFF8 | FFFFFFFFFFFF8000 | FFFFFFFFFFFFFFFF |
+------------------+------------------+------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES