mysql xor
The XOR operator in MySQL is used to perform a bitwise XOR operation between two expressions.
Syntax:
expr1 XOR expr2
The XOR operator returns a 1 in each bit position where the corresponding bits of either but not both operands are 1s.
Example:
SELECT 10 XOR 6;
Output:
12
In this example, the binary representation of 10 is 1010 and the binary representation of 6 is 0110. The XOR operation between these two binary numbers results in 1100, which is equal to 12 in decimal.
原文地址: https://www.cveoy.top/t/topic/brHP 著作权归作者所有。请勿转载和采集!