Description
The BIT_AND( ) function returns the bitwise AND of all bits in expr. If there is no matching row, then the function returns 18446744073709551615.
This function has the form:
SELECT BIT_AND(expr)
Parameter | Description |
---|---|
expr | An expression |
Return Value
The bitwise AND of all bits in expr. If there is no matching row, then the function returns 18446744073709551615.
Examples
The following example shows the basic use of this function:
mysql> SELECT MAKER, BIT_AND(PRICE) BITS
FROM CARS GROUP BY MAKER
+---------------------------+
|MAKER BITS |
+---------------------------+
|CHRYSLER 512 |
|FORD 12488 |
|HONDA 2144 |
+---------------------------+