S
S
skillu2016-02-19 23:30:17
MySQL
skillu, 2016-02-19 23:30:17

MySQL: Why does the MAX(varbin) function return hieroglyphs?

If in MySQL a value of type varbinary is passed to the aggregate function MAX(), then the result of the function is a string in the form of hieroglyphs, i.e. query:
select max(0x258770100075258F)
will return the following: gmv7Py6UxMa9D2.jpg
But I did not find any restrictions on the type of the argument value in the documentation. What could be causing this, any ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2016-02-19
@unitby

MAX([DISTINCT] expr)
Returns the maximum value of expr. MAX() may take a string argument; in such cases, it returns the maximum string value

R
Rsa97, 2016-02-19
@Rsa97

This is your value 0x258770100075258F as a UTF-8 string

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question