bitnot

description

Syntax

BITNOT(Integer-type value)

返回一个整数取反运算的结果.

整数范围:TINYINT、SMALLINT、INT、BIGINT、LARGEINT

example

  1. mysql> select bitnot(7) ans;
  2. +------+
  3. | ans |
  4. +------+
  5. | -8 |
  6. +------+
  7. mysql> select bitxor(-127) ans;
  8. +------+
  9. | ans |
  10. +------+
  11. | 126 |
  12. +------+

keyword

  1. BITNOT