0

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

enter image description here

What is the purpose of aggregate operation like:

SELECT name, value FROM table GROUP BY name HAVING BIT_OR(value) = 0;

1 Answers1

1

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.

danblack
  • 8,258
  • 2
  • 12
  • 28