Name

BIT_AND( )

Synopsis

BIT_AND(column)

This function returns the bitwise AND of all elements in column. Use this in conjunction with the GROUP BY clause. The function has a 64-bit precision. If there are no matching rows, before Version 4.0.17 of MySQL, a -1 is returned. Newer versions return 184467440737039551615, which is the maximum value for an unsigned BIGINT column.

Get MySQL in a Nutshell 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.