MySQL 位函数和运算符
名称描述&按位与>>右移<<左移^按位异或BIT_COUNT()返回设置的位数|按位或~位反转 mysql> SELECT 127 | 128, 128 << 2, BIT_COUNT(15); +-----------+----------+---------------+ | 127 | 128 | 128 << 2 | BIT_COUNT(15) | +-----------+----------+---------------+ | 255 | 512 | 4 | +-----------+----------+---------------+ mysql> SELECT '127' | '128', '128' << 2, BIT_COUNT('15'); +---------------+------------+-----------------+ | '127' | '128' | '128' << 2 | BIT_COUNT('15') | +---------------+--
MySQL 位函数和运算符最先出现在Python成神之路。
共有 0 条评论