The hex() function converts a BLOB value into a
hexadecimal text representation. The parameter data is assumed to be a BLOB. If
it is not a BLOB, it will be converted into one. The returned
text value will contain two hexadecimal characters for each byte
in the BLOB.
Be careful about using hex() with large BLOBs. The
UTF-8 text representation is twice as big as the original BLOB
value, and the UTF-16 representation is four times as
large.