BIT_OR(expression)

Description: Returns the bitwise OR of all bits in expression. Generally used with GROUP BY clause, but otherwise operates on all rows returned.

Performed with 64-bit (BIGINT) precision.

Example:

SELECT BIT_OR(some_flag)
  FROM table

See also: BIT_AND()

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.