BIT_XOR
函数说明
BIT_XOR() 是一个聚合函数,计算了列中所有位的按位异或。
函数语法
1. > BIT_XOR(expr)
参数释义
| 参数 | 说明 |
|---|---|
| expr | UINT 类型的列 |
示例
1. > drop table if exists t1;
2. > CREATE TABLE t1 (id CHAR(1), number INT);
3. > INSERT INTO t1 VALUES
4. ('a',111),('a',110),('a',100),
5. ('a',000),('b',001),('b',011);
7. > select id, bit_xor(number) from t1 group by id;
8. +------+-----------------+
9. | id | bit_xor(number) |
10. +------+-----------------+
11. | a | 101 |
12. | b | 10 |
13. +------+-----------------+
