Home >Database >Mysql Tutorial >What will MySQL return if we convert an empty hex value to a number?
We know that an empty hex value is a zero-length binary string, so if you add 0 to it, the result will be 0. In other words, we can say that if we convert an empty hexadecimal value to a number, then it produces 0. The following query will make it understand -
mysql> SELECT X''+ 0; +--------+ | X''+ 0 | +--------+ | 0 | +--------+ 1 row in set (0.15 sec)
The above is the detailed content of What will MySQL return if we convert an empty hex value to a number?. For more information, please follow other related articles on the PHP Chinese website!