select hex(28) from dual; -- 1C
select unhex(1C) from dual; -- Error 1054 : Unknown Column '1C'
select b'(binary(unhex(1C))' | b'(binary(unhex(F))' from dual; -- Error 1064
Since you can't be bothered to click the link I gave you, I'll copy the relevant (opening) paragraphs here. It never ceases to amaze me how lazy some people are.
As documented under Hexadecimal Literals:
MySQL supports hexadecimal values, written using
valcontains hexadecimal digits (
A..F). Lettercase of the digits does not matter. For values written using
valmust contain an even number of digits. For values written using
0xvalsyntax, values that contain an odd number of digits are treated as having an extra leading
0. For example,
0xaaaare interpreted as
In numeric contexts, hexadecimal values act like integers (64-bit precision). In string contexts, they act like binary strings, where each pair of hex digits is converted to a character:
SELECT 0x1c | 0xf
See it on sqlfiddle.
Next time, when someone tries to be helpful and suggests that you read the relevant bit of documentation, perhaps give that a go instead of expecting to be spoon-fed like a baby?