BINARY Operator
Cast a string to a binary string. This operator converts a character string to a binary string, often used for case-sensitive comparisons.
Syntax
BINARYDescription
Examples
SELECT 'a' = 'A';
+-----------+
| 'a' = 'A' |
+-----------+
| 1 |
+-----------+
SELECT BINARY 'a' = 'A';
+------------------+
| BINARY 'a' = 'A' |
+------------------+
| 0 |
+------------------+
SELECT 'a' = 'a ';
+------------+
| 'a' = 'a ' |
+------------+
| 1 |
+------------+
SELECT BINARY 'a' = 'a ';
+-------------------+
| BINARY 'a' = 'a ' |
+-------------------+
| 0 |
+-------------------+See Also
Last updated
Was this helpful?

