Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Casts the input to a binary datatype. There is usually no visible effect on the printed value; what changes is the rules for comparison and sorting.
BINARY( input )
A binary object.
SELECT 'ohai' = 'OHAI', BINARY('ohai') = 'OHAI';
+-----------------+-------------------------+
| 'ohai' = 'OHAI' | BINARY('ohai') = 'OHAI' |
+-----------------+-------------------------+
| 1 | 0 |
+-----------------+-------------------------+