w3resource

MySQL BITWISE OR Operator

BITWISE OR Operator

MySQL bit wise OR operator returns an unsigned 64-bit integer.

Syntax:

|

MySQL Version: 8.0

Example

Code:

SELECT 2 | 5;

Explanation:

The above MySQL statement will return an unsigned integer for numbers specified as arguments.

Output:

mysql> SELECT 2 | 5;
+-------+
| 2 | 5 |
+-------+
|     7 | 
+-------+
1 row in set (0.00 sec)

Previous: INVERT BITS
Next: BITWISE XOR



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/mysql/bit-functions/bitwise-or.php