Understanding the use of bitwise operators in MySQL? Can someone explain the purpose of using bitwise operators(like BIT_OR) in MySQL queries. For example, if have a table such as following:



What is the purpose of aggregate operation like:

SELECT name, value FROM table GROUP BY name HAVING BIT_OR(value) = 0;
As an aggregate function the BIT_OR is evaluated as a bitwise OR of all the values in the group. If it equates to 0, none of the value have been set.